Search code examples
node.jsvue.jspublishingpm2nuxt.js

How to run nuxt.js in real service?


I used vue-cli in

vue init nuxt/express myProject

and,

npm run dev

developed.

but,

npm run build

after, was created dist file.

How i can run in real service in pm2?

(I will use ubuntu in AWS EC.)


Solution

  • you just need to start your app like that:

    pm2 start npm --name "your-project-name" -- start
    

    Check the status:

    pm2 status
    

    and after you can restart / stop:

    pm2 restart your-project-name
    pm2 stop your-project-name