lionphilips / node-rest-api-scaffold

This project is an initial NodeJS Rest API scaffold for developers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-rest-api-scaffold

This project has the intention to help developers to build your REST API fastly. The main modules of any application are made, like Authentication, Models, Controllers, Repositories, Routes, Services, etc. You just need to make a simple configuration and run!

Code Strucutre

  • doc/
  • src/
    • controllers/
    • models/
    • repositories/
    • routes/
    • services/
    • validators/
    • app.js
    • config.js
  • test/
    • config
  • www/

Tech

This scaffold uses a number of open source projects to work properly:

  • Node.js - evented I/O for the backend
  • Express - fast node.js network app framework
  • Mongoose - elegant mongodb object modeling for node.js
  • JWT Auth - JsonWebToken implementation for node.js
  • Sengrid - Allows to quickly and easily send emails through SendGrid using nodejs.
  • apiDoc - Inline Documentation for RESTful web APIs
  • Mocha - simple, flexible, fun javascript test framework for node.js

Installation

Requires Node.js (version 8 is recommended).

You need to edit src/config.js and put your configuration variables.

Install the dependencies and devDependencies and start the server.

$ cd node-rest-api-scaffold
$ npm install
$ node www/server

Testing

You need to edit the test config file test/config and run:

$ npm test

Documentation

You can see the API documentation on doc/ folder. If you want to re-generate the documentation, you need to run this comand:

$ apidoc -i src/controllers

Development

Want to contribute? Great! Make a change in your file and instantanously see your updates!

License

Apache-2.0

About

This project is an initial NodeJS Rest API scaffold for developers

License:Apache License 2.0


Languages

Language:JavaScript 100.0%