Skip to content

Instantly share code, notes, and snippets.

@fodra
Last active August 1, 2018 00:18
Show Gist options
  • Save fodra/36a752ac17899f89438458a5bd002347 to your computer and use it in GitHub Desktop.
Save fodra/36a752ac17899f89438458a5bd002347 to your computer and use it in GitHub Desktop.
Notes on npm
  1. Save is implied npm config set save=true

  2. We want the exact version of the dependency npm config set save-exact=true

  3. Add supported node version in package.json

{
  "engines": {
    "node": "4.2.1"
   }
}
  1. Install node foreman for environment variables management npm install -g foreman

package.json

{
   "scripts" : {
    "start": "node app.js"
   }
}

Create a .env file

nf start

Loads the .env file and starts the application

  1. All javascript file names are in lowercase.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment