Troix88 Posted December 4, 2019 Share Posted December 4, 2019 Hello I have created a very simple program, that allows users to connect to server and click the message "Click me" to append some text. This appended text is visible for all connected clients: GitLab Repo Locally I am able to get into the directory and start node server.js on the command line, then I open the client1.html and this is all I have to do. I have come to understand, that for the deployment on Heroku there are some additional files I have to add to make it happen. So I added the Procfile with web: node server.js as its content. Then I created a package.json file with npm init. I assume what is missing is a line telling heroku which page is the starting page in my case this would be client1.html. { "name": "demo", "version": "1.0.0", "description": "", "main": "server.js", "dependencies": { "ws": "^7.1.2" }, "devDependencies": {}, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "node server.js" }, "engines": { "node": "10.16.3" }, "repository": { "type": "git", "url": "git+https://gitlab.com/Roobiks/demo.git" }, "author": "", "license": "ISC", "bugs": { "url": "https://gitlab.com/Roobiks/demo/issues" }, "homepage": "https://gitlab.com/Roobiks/demo#readme" } What else has to be done to make it happen on heroku? Kind regards, Troix88 Quote Link to comment Share on other sites More sharing options...
Danidre Posted January 2, 2020 Share Posted January 2, 2020 Should be fine enough to go on heroku. Make sure you have .gitignore so you can ignore the node_modules when uploading to github. Quote Link to comment Share on other sites More sharing options...
8Observer8 Posted February 16, 2020 Share Posted February 16, 2020 (edited) Show a minimum example of your server and client scripts. Edited February 16, 2020 by 8Observer8 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.