An opinionated starting point for Node backends.
Goal: Create a Node boilerplate that, when coupled with app-sprout-client, is able to register and login new users as well as CRUD some fields.
- Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew doctor
open ~./bash_profile
- Add
export PATH="/usr/local/bin:$PATH"
to your bash profile and save it.
- NodeJS
brew install node
- Gulp
npm install --global gulp
- MongoDB
brew install mongodb
- Set environment variables. Open your bash profile and set:
export NODE_ENV="development"
export SESSION_SECRET=“anything”
export NODE_HOST="YOUR_MAC.local:9000"
whereYOUR_MAC
is equal to your computer name as defined in System Preferences >> Sharing >> Computer Name.
npm install
gulp
Tests are run through gulp, using gulp-spawn-mocha.
gulp tests