How i can deploy in a vps server?

I’m trying to deploy in a vps server.

What i do:

Install node.js in server;
in cPanel, in Application Manager i register my application and click in “Ensure Dependencies”;
I check the node_modules and my modules is installed;
I connect via ssh, move to my folder and make a: ENV_SILENT=true npm start
I receive: "info: serving app on http://ipfrommyserver:3000"

But when i try to access one api is returning: Could not get any response

I also tried with pm2:

[PM2] Applying action restartProcessId on app [server](ids: 0)
[PM2] [server](0) ✓
[PM2] Process successfully started
│ id │ name               │ mode     │ ↺    │ status    │ cpu      │ memory   │
│ 0  │ server             │ fork     │ 15   │ online    │ 0%       │ 8.3mb    │

But when i try to access my api i receive no Could not get any response.

i need a nginx?

Romain wrote quite a long post how to deploy Adonis in VPS:

You can try to change HOST to ensuring that you are listening on all incoming traffic at certain port

Also make sure that you are accessing port 3000 and it is not blocked by any firewall

1 Like