Simple template for creating a Node.js REST API. This template will help you to develop your own API.
The structure is very simple and easy to maintain. Use models, controllers and routes folders to add more features. Clone this repository and use it. If you feel like contributing, please fork it and send a pull request.
Update config.js with your own parameters to connect to your database and more. Some of features in app.js are commented, if you want to add some of the implemented services (services folder), you should check and uncomment what you need in app.js
You can add your new entities to this folder. Follow versions.model.js example and go on!
Each controller has a worker, remember this to maintain a clean code.
Routes are ways that we can handle user navigation to various URLs throughout our application. See routes folder, you can use get, post, put, delete and others in your routes. See a full list of potential routing methods here: Express routing methods
There are many services you can use in your app like send emails, send push notifications, make chat with socket services, crypt service, token managers, image uploader and more...
All new models and routes must be initialized in your app.js
Alberto Aznar, info@alberdev.com.
Feel free to collaborate with ideas 💭, issues
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
node-api-template is available under the MIT license. See the LICENSE file for more info.