Learning Real Time Notification with NodeJS And HTML5

Hi friends! Today we are learning real-time notification with Node js & html5.

Your page should look something like this,

page

So let’s start,

Make a new folder & rename that as you like then right click on that folder and open git bash and type npm init and hit enter after you see something like this,

cmd

After creating that you make two files on that folder and write name app.js and index.js,

and write code something like this,

code

and index.js,

code

After writing all code just type Node app.js on your git bash and when your server is running go on browser, and just type local host: 3000 and hit enter.

browser

After that you click on the button and find notification of your given message. It’s just for demo purposes --  you can make it better.

Ebook Download
View all
Learn
View all