generator-blip-api-kates

Yeoman generator for BLiP apis projects with helm and kubernetes.

Usage no npm install needed!

<script type="module">
  import generatorBlipApiKates from 'https://cdn.skypack.dev/generator-blip-api-kates';
</script>

README

Generator BLiP API Kates

Yeoman generator for a API using BLiP and ready to Kubernetes and helm.

NPM Version Downloads Travis Status CircleCI Status AppVeyor Status Coveralls Status License

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 .

License

MIT