Skip to content

Instantly share code, notes, and snippets.

@williamtran29
Forked from spac3unit/pm2 next.js
Created February 1, 2019 08:49
Show Gist options
  • Save williamtran29/4e57c1f0d987de0d1d841bc9bc2dde8a to your computer and use it in GitHub Desktop.
Save williamtran29/4e57c1f0d987de0d1d841bc9bc2dde8a to your computer and use it in GitHub Desktop.
# for development
pm2 start npm --name "next" -- run dev
# for production
npm run build
pm2 start npm --name "next" -- start
"scripts": {
"start": "node ./node_modules/.bin/pm2 start app.js -i max --attach"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment