N
N
N!crO2018-08-04 16:12:12
JSON
N!crO, 2018-08-04 16:12:12

What is the difference between deployment with NPM_CONFIG_PRODUCTION=true || false?

Explain popularly deploy with NPM_CONFIG_PRODUCTION.

package.json Server
{
"name": "server",
"version": "1.0.0",
"main": "index.js",
"author": "n1cro",
"scripts": {
"start": "node index.js",
"server": "nodemon index.js",
"client": "npm run start --prefix client",
"dev": "concurrently \"npm run server\" \"npm run client\" \"npm run webhook\"",
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=true npm install --prefix client && npm run build --prefix client",
"webhook": "lt -p 5000 -s asloasd"
},
"license": "MIT",
"dependencies": {
"body-parser": "^1.18.3",
"concurrently": "^3.6.1",
"cookie-session": "^2.0.0-beta.3",
"express": "^4.16.3",
"lodash": "^4.17.10",
"mongoose": "^5.2.4",
"passport": "^0.4.0",
"passport-google-oauth20": "^1.0.0",
"path-parser": "^4.2.0",
"sendgrid": "^5.2.3",
"stripe": "^6.4.0"
},
"devDependencies": {
"nodemon": "^1.18.3"
}
}
package.json Client
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.18.0",
"materialize-css": "^0.100.2",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-redux": "^5.0.7",
"react-router-dom": "^4.3.1",
"react-scripts": "1.1.4",
"react-stripe-checkout": "^2.6.3",
"redux": "^4.0.0",
"redux-form": "^7.4.2",
"redux-thunk": "^2.3.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"proxy": {
"/auth/google": {
"target": "localhost:5000"
},
"/api/*": {
"target": "localhost:5000"
}
},
"devDependencies": {
"redux-devtools-extension": "^2.13.5"
}
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question