From 4abafd81a8b099bac6cb58aa378a47d3d676d99c Mon Sep 17 00:00:00 2001 From: Mats Date: Wed, 19 Aug 2020 08:57:53 +0200 Subject: [PATCH] Added pm2 start and custom port --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d08a1fd..cf6e332e 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,29 @@ By default this will launch the application on `http://localhost:3000`. You will [proxy](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) requests from your web server or change the [port](https://nextjs.org/docs/api-reference/cli#production) to serve the application directly. +### Start the application with pm2 and custom port + +Add the custom port (here '-p 3010') at the start script: + +```json +"scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start -p 3010", + "build-tracker": "rollup -c rollup.tracker.config.js", + "build-mysql-schema": "dotenv prisma introspect -- --schema=./prisma/schema.mysql.prisma", + "build-mysql-client": "dotenv prisma generate -- --schema=./prisma/schema.mysql.prisma", + "build-postgresql-schema": "dotenv prisma introspect -- --schema=./prisma/schema.postgresql.prisma", + "build-postgresql-client": "dotenv prisma generate -- --schema=./prisma/schema.postgresql.prisma" +}, +``` + +Start the application with pm2: + +``` +pm2 start npm --name "unami" -- start +``` + ## License -MIT \ No newline at end of file +MIT