Nest Js (Node Js Framework) - How to start server on Digital Ocean using pm2?
Asked Answered
U

1

5

I have developed my project in the Nest JS framework. My main file in the src folder (src/main.ts). How can I start the server on my Digital Ocean server?

Unlookedfor answered 17/7, 2020 at 11:31 Comment(0)
K
9

After you build the project, then it will have main.js file under /dist. So just run:

pm2 start PATH_TO_YOUR_PROJECT/dist/main.js --name=YOUR_APP_NAME
Koral answered 17/7, 2020 at 11:44 Comment(2)
I have done like this, and its started but when i run project on my browser its not working...Unlookedfor
i dont know why it's not working but first please check if your app is running correctlyKoral

© 2022 - 2024 — McMap. All rights reserved.