0.2.2 • Published 6 months ago

@w2s2k/apigen-cli v0.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

REST API Generator - Command Line

A CLI to generate and run an Express.js REST API using OpenAPI Specification 3.0.3

Install

Run

npm install -g @w2s2k/apigen-cli

You may need to sudo it.

Initialize project

Run

apigen init

This will prompt for some basic data about the api and initialize a new project with the boilerplate in place with the following project structure :

project
├── README.md
├── .gitignore
├── package.json
├── api.json
├── example.env
├── .env
├── handlers
│   ├── healthcheck.js

Initialize project

Run

apigen run

The command will run a service on the port specified in the .env file (API_PORT). And the api.json file (OpenAPI 3.0.3 specification) as an api specification using the attribute x-eov-operation for endpoints handlers

License

MIT - see LICENSE