Unable to run the application using pm2 server

Hi Team,

We are unable to run the application using pm2 server,Are there any specific steps need to follow to run the application using thirdparty servers…Specifically PM2…Please help us out

Lightning is a front-end framework that runs completely in the browser. So in that sense Lightning has very little to do with servers such as pm2.

Are you using the Lightning-SDK and Lightning-CLI for you App? In that case you probably want to use the lng dist command, which generates a standalone dist version of your App.

The dist build is targeted specifically at DIY hosting of your App (versus running it in the Metrological Store). It will produce an index.html and a folder structure containing all your App assets, that you can just host in any way you see fit on your own server.

You can create an simple expressJS server in which on its default route you can serve the dist folder of the lightning app and this expressjs server can be easily run by pm2 server.