switch port for production server

This commit is contained in:
Adam Brown 2016-12-28 17:20:07 -05:00
parent ae5d02b288
commit a2c2407d3c
2 changed files with 6 additions and 5 deletions

View File

@ -39,10 +39,10 @@ To build and launch a dev server:
npm start npm start
npm run server npm run server
To build and launch the distribution server: To build and launch the production server:
npm run build:dist npm run build:prod
npm run server:dist npm run server:prod
@ -62,7 +62,7 @@ On a low-memory machine, eg. a DigitalOcean 512MB instance, you will need to ena
To make the application start on boot, run the following: To make the application start on boot, run the following:
pm2 start grunt --name dubdiff -- serve:dist pm2 start npm --name dubdiff -- run serve:prod
pm2 startup systemd pm2 startup systemd
pm2 save pm2 save

View File

@ -14,7 +14,8 @@ import {Status, StatusError} from '../common/constants'
import render from './render' import render from './render'
const PORT = 8080 //set use port 8080 for dev, 80 for production
const PORT = (process.env.NODE_ENV !== "production" ? 8080 : 80)
const app = express() const app = express()