1.1.1 • Published 4 years ago

vingle-corgi-cli v1.1.1

Weekly downloads
15
License
ISC
Repository
github
Last release
4 years ago

vingle-corgi-cli

CLI commands for development for vingle-corgi

install

npm install vingle-corgi-cli --save-dev

vingle-corgi build

read list of entities from given folder, generate definitions.json that contains JSONSchema of given entities

- src
  - api 
    - entities
      - post.ts
      - comment.ts
      - like.ts

vingle-corgi build "./src/api/entities/"

vingle-corgi run-local

run corgi webserver locally, through express wrapper. apiHandlerPath should be js file that has export of corgi handler,

# ./src/api/index.js
import * as _ from "lodash";
import { Namespace, OpenAPIRoute, Router } from "vingle-corgi";

import { routes } from "./routes";

import * as entityDefinitions from "./entities/definitions.json";

export const router = new Router([
  new OpenAPIRoute(
    "/open-api",
    {
      title: "ExchangeService",
      version: "1.0.0",
      definitions: entityDefinitions,
    },
    routes,
  ),
  new Namespace("", {
    children: routes,
  }),
]);

export const handler = router.handler();

vingle-corgi run-local "./src/api/index.js"

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0-beta.3

5 years ago

1.0.0-beta.2

5 years ago

1.0.0-beta.0

5 years ago