README
Generator BLiP API Kates
Yeoman generator for a API using BLiP and ready to Kubernetes and helm.
File Structure
Assuming your folder is called blip-bot-project
.
Whatever name you choose will replace all occurrences of that string in the project
๐blip-bot-project
|__๐charts
|__๐blip-bot-project
| |__๐templates
| | |__๐{_helpers.tpl}
| | |__๐{autoscale.yaml}
| | |__๐{deployment.yaml}
| | |__๐{ingress.yaml}
| | |__๐{secrets.yaml}
| | |__๐{service.yaml}
| |__๐{.helmignore}
| |__๐{Chart.yaml}
| |__๐{values.yaml}
|__๐src
|__๐config // The app config
| |__๐{default.json}
| |__๐{index.js}
| | |__๐{...}
|__๐controllers // The controllers
| |__๐{example-controller.js}
| |__๐{health-check-controller.js}
|__๐facades // The facades
| |__๐{blip-facade.js}
| |__๐{example-facade.js}
|__๐middlewares // The middlewares
| |__๐{error-middleware.js}
| |__๐{logger-middleware.js}
| |__๐{res-body-middleware.js}
| |__๐{validator-middleware.js}
|__๐models // The models
| |__๐errors // The error models
| | |__๐{bad-request-error.js}
| | |__๐{index.js}
| | |__๐{no-content-error.js}
| |__๐{route.js}
|__๐providers // The providers
| |__๐{blip-provider.js}
| |__๐{logger-provider.js}
|__๐routes // The routes
| |__๐{example-routes.js}
| |__๐{health-check-routes.js}
| |__๐{index.js}
| |__๐{routes.js}
|__๐services // The services
| |__๐{blip-service.js}
| |__๐{example-service.js}
|__๐validators // The schema validators
| |__๐{example-validator.js}
|__๐{app.js} // The app startup config
|__๐{server.js}
|__๐test // The tests
| |__๐{example.test.js}
| |__๐{health-check.test.js}
| |__๐{swagger.test.js}
|__โ๏ธ.editorconfig
|__โ๏ธ.eslintignore
|__โ๏ธ.eslintrc.json
|__โ๏ธ.gitattributes
|__โ๏ธ.gitignore
|__โ๏ธ.prettierrc
|__โ๏ธLICENSE
|__โ๏ธpackage.json
|__โ๏ธREADME.md
|__๐Dockerfile
Usage
Generate without install Yeoman
# Create a directory for your project && Change into directory
$ mkdir my-api-name && cd my-api-name
# Generate a project
$ npm init yo generator-blip-api-kates
Generate installing Yeoman
- Install Yeoman
$ npm install -g yo
- Install Generator
$ npm install -g generator-blip-api-kates
- Creating a project
# Create a directory for your project && Change into directory
$ take my-api-name
# Or
$ mkdir my-api-name && cd my-api-name
# Generate a project
$ yo blip-api-kates
- Running project
Action | Usage |
---|---|
Starting development mode | npm start |
Linting code | npm run lint |
Running unit tests | npm run jest |
Running lint + tests | npm test |
Running code coverage | npm run coverage |
Sending coverage results to Coveralls.io | npm run coveralls |
Development
Prerequisites
$ npm install -g yo
Clone the repo
$ git clone https://github.com/chr0m1ng/generator-blip-api-kates.git
Run generator
# Change into directory
$ cd generator-blip-api-kates
# Link generator
$ npm link
# Run generator
$ yo blip-api-kates
Author
This generator was created based on original oss generator created by Roberto Achar .