Skip to content

Instantly share code, notes, and snippets.

@rajuAhmed1705
Created March 6, 2022 11:45
Show Gist options
  • Select an option

  • Save rajuAhmed1705/e11d2c599004ea21eb1115ed4fc6c224 to your computer and use it in GitHub Desktop.

Select an option

Save rajuAhmed1705/e11d2c599004ea21eb1115ed4fc6c224 to your computer and use it in GitHub Desktop.
pm2-script for nextjs and nodejs
{
"apps": [
{
"name": "app-name-one",//express js app
"cwd": "/directory/of/the/app",
"script": "dist/server.js",
"post_update": ["npm install", "npm run build"]
},
{
"name": "app-name-two", //next js app
"cwd": "/directory/of/the/app",
"script": "npm -- start",
"post_update": ["npm install", "npm run build"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment