Yeoman generator plugin for NodeJS micro-service scaffolding on Cloud Foundry.
- First, install Yeoman and generator-cf-node-server using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-cf-node-server
- Next, provide the necessary inputs to generate your NodeJS micro-service scaffolding.
yo cf-node-server
- Thats's it. You are ready to go!!
- Option to integrate Express or Koa as the web application framework.
- Supports OpenAPI Specification V3.
- Auto generates stubs (controller & service classes) based on Open API Specification V3.
- Provides sample GET, PUT, POST request based on OpenAPI Specification V3.
- Provides out-of-the box '/health' API.
- Ready to deploy on Cloud Foundry.
- Yeoman has a heart of gold.
- Yeoman is a person with feelings and opinions, but is very easy to work with.
- Yeoman can be too opinionated at times but is easily convinced not to be.
- Feel free to learn more about Yeoman.
/apiDefinition/openapi.json
/apiDefinition/openapi.json
Step 2 - Verify file content using Swagger UI (Swagger Editor):
npm run stub
/src/controllers
/src/services
/apiDefinition/openapi.json
npm run stub
npm run local-start
http://localhost:3000/sample
npm run start
http://localhost:3000/health
cf push -f manifest.yml
MIT © Kaustuv Mukherjee