Destroyed Deployments (markdown)

master
Mike Cao 2020-09-04 11:09:04 -07:00
parent 83d21eb0e6
commit b3d8620b0b
1 changed files with 0 additions and 43 deletions

@ -1,43 +0,0 @@
### Create a production build
```
npm run build
```
### Start the application
```
npm start
```
By default this will launch the application on `http://localhost:3000`. You will need to either
[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.
### pm2
Start the application with pm2 'the process manager for production Node.js application' as follows:
```
pm2 start npm --name "unami" -- start
```
### Custom port
Add the custom port in the file 'package.json' as follows:
Add the custom port (here '-p 3010') at the start script and follow one of the run scripts above:
```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"
},
```
(Here the custom port is added with '-p 3010')