AmberJS is a Node.js framework based on Express that enables you to quickly create APIs and microservices composed from backend systems such as databases, REST, and GraphQL services.
- Multilayer folder structure
- Instant feedback and reload
- Ready for production
- Scalable and easy to use web server
- Database integration
- Prepared for testing
- Dependency injection
- CLI integration
- Node.js at v8.9 or greater
- We recommend to use NVM (node version manager)
- JavaScript (ES6)
- REST
- Node v8.10+
- Express
- Sequelize
- Awilix
- Structure
- HTTP Status
- Express Status Monitor
- Nodemon
- PM2
- Mocha
- Chai
- FactoryGirl
- Istanbul + NYC
- ESLint
Code organization inspired by DDD and Clean Architecture focused on codebase scalability.
Use Nodemon to automatically reload the server after a file change when on development mode, makes the development faster and easier.
Setup with PM2 process manager ready to go live on production. It's also out-of-box ready to be deployed at Heroku, you can read more about it here.
Use Express for requests routing and middlewares. There are some essential middlewares for web APIs already setup, like body-parser, compression, CORS and method-override.
Sequelize, an ORM for SQL databases, is already integrated, you just have to set the authentication configurations.
The test suite uses Mocha/Chai and is prepared to run unit, integration and functional tests right from the beginning.
With Awilix, a practical dependency injection library, the code will not be coupled and it'll still be easy to resolve automatically the dependencies on the runtime and mock them during the tests. It's even possible inject dependencies on your controllers with the Awilix Express adapter. Click here if you want to read more about how to use dependency injection with this boilerplate.
Both the application and Sequelize have command-line tools to make it easy to work with them. Check the CLI section to know more about this feature.
First, you’ll need to install a supported version of Node:
Additionally, this guide assumes that you are comfortable with certain technologies, languages and concepts.
Lastly, you’ll need to install the Brewery CLI toolkit:
npm i -g @brewery/cli
For more info, see The AmberJS documentation
This boilerplate is forked and modified from node-api-boilerplate - Talysson de Oliveira Cassiano 👏