1ST STEP :

2ND STEP :

  • Go there : https://dashboard.heroku.com/apps
  • Click “New” button (top right)
  • “Create a new app” and name it as you want. Let’s      call it “Myseembafeaturedgame” for example :)
  • Then your application would be available on the      following domain : “https://myseembafeaturedgame.herokuapp.com/”

Once created, here is what you should see :

“Heroku | Welcome to your new app!

Refer to the documentation if you need help deploying.”

3RD STEP :

Go to your work folder using the console terminal. You need to have the file “app.js” and “client” folder in your work folder. Indeside “client” folder you need to have “index.html” from the instruction above. But we will change a few lines in “app.js”. We will change a port number.

Use the console terminal and access your work folder. There, you will find the “app.js” folder and the “client” folder. In “app.js”, you will then have to change the following line of code :

var port = process.env.PORT || 3000;

By this line of code :

var port = 8080;

4TH STEP :

Add a new file: .gitignore ( "." IS a part of the name)

It should have the following content:

/node_modules/

Add the start script command in package.json here:

"scripts": {
       "start": "app.js",
       "test": "echo \"Error: no test specified\" && exit 1"
   },

5TH STEP :

Enter the following command and change the name “Myseembafeaturedgame” by the name of your game :

heroku login
git init
heroku git:remote -a red-game

You can now add new files, commit them and push/deploy your application on Heroku.

6TH STEP :

Enter these commands:

git commit -am "First commit"
git push heroku master

7TH STEP :

Open your application (example: https://myseembafeaturedgame.herokuapp.com/)

Open your browser console. Click on buttons and you will see messages in the browser console.
Here’s a little test : Open two tabs and press "Send my Name to all Clients" button. You will see a message in the console in the second client tab.

P.S. : Don’t forget to empty your cache