Skip to content

Instantly share code, notes, and snippets.

@mcshiz
Created January 9, 2018 18:47
Show Gist options
  • Save mcshiz/c39fb5447bb7c4f013ba911cb08d753f to your computer and use it in GitHub Desktop.
Save mcshiz/c39fb5447bb7c4f013ba911cb08d753f to your computer and use it in GitHub Desktop.
Helpful snippits

Starting express-generator server with nodemon add this to the servers package json "scripts": { "start": "PORT=3001 nodemon ./bin/www" }

Setting env variables for use with process.env.BLAH Use the dotenv package Create server root level .env file require('dotenv').config({path: '/custom/path/to/your/env/vars'}) variables now accessible under process.env.VARIABLE

Remove files / directories from GIT remote but keep local git rm [-r] --cached [file | folder] git commit -m "message" git push origin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment