0.10.0 • Published 8 years ago
node-rest-api-boilerplate v0.10.0
Express & ES6 API Boilerplate
Tested on Node v6 and above
Features
- ES6 for javascript awesomeness
- MongoDB w/ Mongoose for data layer
- Username/Email registration and authentication
- Testing via Mocha & Chai
- Test coverage via Isparta
Getting Started
First, ensure you have node and mongo installed on your system.
# clone it
git clone git@github.com:kylealwyn/node-rest-api-boilerplate.git
cd node-rest-api-boilerplate
# Make it your own
rm -rf .git && git init
# Install dependencies
npm install
# Run it
npm start
# Try it!
curl -H "Content-Type: application/json" -X POST -d '{"username":"jamesdean", "email": "example@gmail.com", "password":"password1"}' http://localhost:4567/users
Commands
npm start
- Start live-reloading development server
npm test
- Run test suite
npm run test:watch
- Run test suite with auto-reloading
npm run coverage
- Run test coverage
npm run build
- Generates production ready application in
./build
- Generates production ready application in
Todo
- Add OAuth Login Support (Facebook, Twitter, Google)
- Add support for MySql or PostgreSQL (Possibly with sequelize)
- Write tests to exemplify Mongo interactions
- Move all data retrieval logic into services to remove Mongo dependences in controllers
- Reset password functionality
License
MIT