Skip to content

Instantly share code, notes, and snippets.

@wkei
Created January 26, 2018 10:26
Show Gist options
  • Save wkei/69c276301295cbb7d99d4688108a2c95 to your computer and use it in GitHub Desktop.
Save wkei/69c276301295cbb7d99d4688108a2c95 to your computer and use it in GitHub Desktop.
React SSR npm scripts
{
"scripts": {
"start": "node scripts/start.js",
"dev": "NODE_ENV=development SERVER_ENV=development nodemon --exec 'babel-node' server/index.js",
"pre": "npm install -g npm-run-all pm2",
"build:install": "npm install",
"build:client": "node scripts/build.js",
"build:server": "babel server -d build-server",
"build:serverassets": "NODE_ENV=production webpack --config ./config/webpack.server.assets.config.js",
"serve": "node build-server/index",
"stg:build": "NODE_ENV=staging SERVER_ENV=staging npm-run-all build:*",
"stg:run": "NODE_ENV=staging SERVER_ENV=staging npm-run-all stg:build serve",
"stg:pm2": "pm2 startOrRestart pm2.config.js --only ifund-web-stg",
"stg:setup": "pm2 deploy pm2.config.js staging setup",
"stg:deploy": "pm2 deploy pm2.config.js staging",
"prod:build": "NODE_ENV=production SERVER_ENV=production npm-run-all build:*",
"prod:run": "NODE_ENV=production SERVER_ENV=production npm-run-all prod:build serve",
"prod:pm2": "pm2 startOrRestart pm2.config.js --only ifund-web-prod",
"prod:setup": "pm2 deploy pm2.config.js production setup",
"prod:deploy": "pm2 deploy pm2.config.js production",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment