Generates an express API server written in Typescript with routes/controllers/validation/model/migration generation capabilities. Use an OpenAPI 3 yaml file to generate controllers / routers / validators Use a yaml to generate objection.js models and knex migrations
Uses the following libraries:
configurity: Handles configurationobjection-generator: Generates Typescript objection.js models and knex migrationsnew-error: Used to build an error-handling infrastructureapifire: Generates Typescript controllers/routers/validators from an OpenAPI 3 spec.ajv: Validates API request parameters in routersloglayer: Structured logging
See the apifire for notes on current limitations with using an OpenAPI 3 spec.
The generated project comes with a sample OpenAPI and objection-generator spec to quickly get a working server up and running.
First, install Yeoman and generator-api-server using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-apifire-serverThen generate your new project:
yo apifire-server- 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.
MIT © Theo Gravity