Do you know we can send html pages to the client?

Yes! You can do it using node js.

First we’ll create the server as like day 12

For sending the html file we need the `fs module` which in built in node.

I got the starter from bootstrap – https://getbootstrap.com/docs/4.4/getting-started/introduction/

We need to create stream using fs module. So that we can send the html file.

Then we can send it using pipe and send the response.

Now run it using node app.js

See the result

Let me know if you have any questions about it.

Leave a Reply

Your email address will not be published. Required fields are marked *