Skip to content

Generates an express-based API server w/ database migrations and models and an error-handling / logging infrastructure written in Typescript

License

Notifications You must be signed in to change notification settings

theogravity/apifire-server

Repository files navigation

generator-apifire-server

NPM version built with typescript

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 configuration
  • objection-generator: Generates Typescript objection.js models and knex migrations
  • new-error: Used to build an error-handling infrastructure
  • apifire: Generates Typescript controllers/routers/validators from an OpenAPI 3 spec.
  • ajv: Validates API request parameters in routers
  • loglayer: 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.

Installation

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-server

Then generate your new project:

yo apifire-server

Getting To Know Yeoman

  • 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.

License

MIT © Theo Gravity

About

Generates an express-based API server w/ database migrations and models and an error-handling / logging infrastructure written in Typescript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published