Overview

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.

Features

Multilayer folder structure

Code organization inspired by DDD and Clean Architecture focused on codebase scalability.

Instant feedback and reload

Use Nodemon to automatically reload the server after a file change when on development mode, makes the development faster and easier.

Ready for production

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.

Scalable and easy to use web server

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.

Database integration

Sequelize, an ORM for SQL databases, is already integrated, you just have to set the authentication configurations.

Prepared for testing

The test suite uses Mocha/Chai and is prepared to run unit, integration and functional tests right from the beginning.

Dependency injection

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.

CLI integration

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.

Prerequisites

First, you’ll need to install a supported version of Node:

  • Node.js at v8.9 or greater
  • We recommend to use NVM (node version manager)

Additionally, this guide assumes that you are comfortable with certain technologies, languages and concepts.

  • JavaScript (ES6)
  • REST

Lastly, you’ll need to install the Brewery CLI toolkit:

npm i -g @brewery/cli

For more info, see The AmberJS documentation

Tech

Acknowledgement

This boilerplate is forked and modified from node-api-boilerplate - Talysson de Oliveira Cassiano 👏