N
N
Nazar Gorbunov2020-05-14 18:36:38
JavaScript
Nazar Gorbunov, 2020-05-14 18:36:38

How to deploy a MEVN app NOT on heroku?

I was looking for how to deploy a MEVN application on a VPS server, but did not find it. There is a working version on the local, it works. I listen to ports, connect static files, connect via DB, but transfer to VPS and 403 error, and it just takes a long time to load on the port and as a result "I can't access the site." Most likely, I didn’t take into account something, but I’ve been fiddling around for a long time and don’t know where to look. On the server, node index.js starts up and connects to the database, but does not show requests (on the local server, when I went to localhost: 3000, there was data on requests in the console). I installed only MongoDB and Node (apt) on the VPS.
At least some sources to look at, everyone uses heroku, but we have a regular VPS hosting.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nazar Gorbunov, 2020-05-15
@Arly0

The answer has been found. Not the fact that he is a worker, because. I've tried a lot of things, but here's what I can highlight. The NGNIX setup was initially wrong. From here I took only the NGNIX
setting. Then, it was very important that the front should lie in / public (for some reason, this name passed)
And just turn on the ports (although I tried it before, but it happened exactly the second time after the actions above)
iptables -I INPUT -p tcp --dport 3000 -j ACCEPT
Hope it helped someone.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question