Glee is a back-end starting point for development teams who use a specific stack of technologies and methodologies (see below). Glee includes build scripts, sample/template code and everything you need to quick-start back-end development. Glee's requirements were inspired by https://gist.github.com/bsommardahl/c2d57d51242b2336b7876f20fcf16ac6.
Glee provides a basic Rest API template:
- ES6 + babel,
- Removes Flow type annotations,
- Transforms imports to lazy CommonJS requires,
- Transforms async/await to generators,
- ESLint with the airbnb-base and flowtype rules,
- Jest unit testing and coverage,
- Type definitions for Jest,
- NPM scripts for common operations,
- .editorconfig for consistent file format,
- Yarn lockfile so only verified and up-to-date dependencies are installed.
- PostreSQL Database integration with migrations
- Feature Toggling
- Authentication by JWT (requires separate IDP for auth and user management)
- API documentation by Swagger (auto-generated)
- Automated Acceptance Testing with Cucumber
- CloudFormation configuration
- Docker container
- Buildkite configuration
- Command Dispatching with MotoTaxi
- Guidance for CQRS architecture
npm install -g yarn
You need PostgreSQL to run glee locally. To install postgres on Ubuntu, check out this awesome tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04 (for Windows, head to google).
Glee comes with default database configurarion for localhost
. You can change your db config by modifying ./src/config/sequelize.js
. This config file is ignored by git, so it will not get checked in with your secrets.
This project requires Node.js 8.2 or later and NPM, Yarn is optional but recommended. Make sure you have those installed. Then just type following commands:
git clone https://github.com/acklenavenue/glee
cd glee
yarn
yarn run first-time
Glee comes with default logging configurarion for Loggly.com. You can change your logging config by modifying ./src/config/loggly.js
. This config file is ignored by git, so it will not get checked in with your secrets.
Run using either npm run <script>
or yarn run <script>
comand.
clean
- remove coverage data, Jest cache and transpiled files,lint
- lint source files and tests,typecheck
- check type annotations,test
- lint, typecheck and run tests with coverage,test-only
- run tests with coverage,test:watch
- interactive watch mode to automatically re-run tests,build
- compile source files,build:watch
- interactive watch mode, compile sources on change.aat
- run automated acceptance tests
If you have any questions regarding this project:
- consult the [FAQ][wiki-faq] wiki page first,
- search for issues marked as question,
- if none of the above is appropriate, open an issue.
This boilerplate was initially inspired by Jakub Synowiec, but taken several steps further to include a basic Hapi-based REST API with CQRS-style command dispatching.
- Sample development workflow with Docker and debugging via Inspector - http://youtu.be/c-JCVQlwWgE
MIT License. See the LICENSE file.