R
R
Roman Peterson2017-04-18 23:32:34
Node.js
Roman Peterson, 2017-04-18 23:32:34

Why is the Node.JS (Express) application not visible from the outside on the VPS?

I bought the first VPS in my life, I'm trying to install an application on CentOS.
1. Installed Node.JS
2. Installed Express and Express generator
3. Created a site template (typed express mysite)
4. Entered the mysite folder, did npm install
5. Did npm start
Such operations on Windows lead to profit, and on the server the application works, but it is not visible from the outside (I type http://xxx:3000 where xxx is the server ip). I tried to access the server from the second terminal and make an http request from the command line (via ip and via localhost) - the result is the same.
I suspect that I, as a complete noob, did not take into account something, for example, I did not open the port to the outside or something else. Tell me plz.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Peterson, 2017-04-23
@nochnoy

I decided for myself simply - demolished Centos, installed Ubuntu - everything works on it.
It’s a pity that I didn’t know what the chip was)

S
scrpcc1, 2017-04-18
@scrpcc1

You need to create a reverse proxy through nginx
https://www.digitalocean.com/community/tutorials/h...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question