0

Noob here. I made a simple node.js app. It works fine on my "localhost:3000" with this:

app.listen(3000, function (){
    console.log('Server started');
});

Now, I want to make it available from my website. How do I do that?

Rohalt
  • 147
  • 1
  • 2
  • 13
  • 1
    Well nodejs is certainly not something that you can make available from your website. For that you need to get a web host which either comes with nodejs preinstalled or install on your own. Then start your app just like you did in your PC. Search for `deploying nodejs application` in google and you should get something to start. – maksbd19 Jun 13 '18 at 04:55
  • 1
    check out this if it helps https://stackoverflow.com/questions/16573668/best-practices-when-running-node-js-with-port-80-ubuntu-linode – mehari Jun 13 '18 at 05:24
  • 1
    Try out deploying Node app with Heroku. It's really simple if you know GIT. Just don't hardcode port to 3000 instead use a variable. const port = process.env.PORT | 3000 , app.listen(port, () => {console.log('Server Started');}); – Vishal-L Jun 13 '18 at 11:20

0 Answers0