Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save aneudysamparo/1eae202b1e6564789c14c16408fbb4b5 to your computer and use it in GitHub Desktop.
Save aneudysamparo/1eae202b1e6564789c14c16408fbb4b5 to your computer and use it in GitHub Desktop.
How to deploy a NestJS app on Plesk
-Copy files to web directory ex: app.js and folders
-copy packages.json to webdirectory
-npm install
-change permision to all files and folders to only owner read
pase this on top of your app.js file
if (typeof(PhusionPassenger) !== 'undefined') {
PhusionPassenger.configure({ autoInstall: false });
}
and this where port is set.
if (typeof(PhusionPassenger) !== 'undefined') {
app.listen('passenger');
} else {
app.listen(3000);
}
-start the app
it should works
https://www.phusionpassenger.com/library/indepth/nodejs/reverse_port_binding.html#express-js-solution-example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment