In this tip I will explain how we can deploy our Next.js Application in Production mode and also run that Application with PM2. If you don’t know about Next.js then in simple word it was client side framework like Angular or ember etc. But most important thing it have server side render support, Stay connect I am going to publish some more tutorial over Next.js soon.

Step 1. Open you package.json file and replace scripts with below code

Step 2. Create your production build using below

Step 3. Now once your build complete successfully run below command to run your Next.js with PM2

Hope this post help you.