npm install -production code example

Example 1: intall npm

npm install -g npm

Example 2: how to import npm packages in node.js?

//in cmd prompt: 
//npm i <package-name>

//defining package in code: 
const package = require("package-name")

Example 3: npm start for production

{
  "scripts": {
    "start": "NODE_ENV=development REACT_SERVER_CONFIGS=_configs/development/ react-server start",
    "start-beta": "NODE_ENV=beta REACT_SERVER_CONFIGS=_configs/beta/ react-server start",
    "start-prod": "NODE_ENV=production REACT_SERVER_CONFIGS=_configs/production/ react-server start"
  }
}