Skip to content
 
 

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS RESTful API Boilerplate

This is a boilerplate for building RESTful APIs with NodeJS.

Getting Started

# clone it
git clone git@github.com:developit/express-es6-rest-api.git
cd express-es6-rest-api

# Make it your own
rm -rf .git && git init && npm init

# Install dependencies
npm install

# Start development live-reload server
PORT=8080 npm run dev

# Start production server:
PORT=8080 npm start

Roadmap

  • ✅ Add version information to endpoint path /api/v0/
  • ✅ Change example endpoint to /posts
  • ✅ Add sample data for /posts
  • ✅ Create Mocha tests for example endpoint
  • ✅ Respond with 201 and Location header for successful POST requests
  • ⬜ Add folder structure to README
  • ⬜ Add test to build step in packages.json
  • ⬜ Rename project to nodejs-rest-api-boilerplate
  • ⬜ Update README for example Posts endpoint - /docs/example
  • ⬜ Update README for tests - /docs/tests
  • ⬜ Create POSTman README - /docs/postman
  • ⬜ Create cURLS README - /docs/curl
  • ⬜ Add Docker support with Nginx and SSL
  • ⬜ Implement JWT authentication https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens
  • ⬜ Add example code for searching with parameters at GET endpoint
  • ⬜ Update REAMDE with best practices reference http://gaboesquivel.com/blog/2015/best-practices-for-designing-web-apis/
  • ⬜ Create /authors example endpoint
    • ⬜ Update README
    • ⬜ Create test
  • ⬜ Create subroute example - /authors/:id/posts
    • ⬜ Update README
    • ⬜ Create test
  • ⬜ Return Links with GET /authors endpoint to related posts in res.Links[0...n].href
  • ⬜ Standardize format of error responses with JSON and meaningful messages
  • ⬜ Add params/querystring based logic to example - /posts?author=Superman
    • ⬜ Update README
    • ⬜ Create test
  • ⬜ Provide inline API documentation with examples http://apidocjs.com/
  • ⬜ Implement uuid.v4() for ids in sample data and POST logic
  • ⬜ Move db to importable/global resource for access from /models directory
  • ⬜ Provide Heroku deployment example

Forked

This project was forked from https://github.com/developit/express-es6-rest-api.

License

MIT

About

🌱 Starter project for a NodeJS RESTful API

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages