Created
April 2, 2020 22:18
-
-
Save aneudysamparo/1eae202b1e6564789c14c16408fbb4b5 to your computer and use it in GitHub Desktop.
How to deploy a NestJS app on Plesk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-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