Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/catchfashion/corgi-template
https://github.com/catchfashion/corgi-template
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/catchfashion/corgi-template
- Owner: catchfashion
- Created: 2019-10-12T13:29:44.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-29T09:41:59.000Z (over 2 years ago)
- Last Synced: 2024-05-27T15:56:32.423Z (6 months ago)
- Language: TypeScript
- Size: 205 KB
- Stars: 4
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Corgi-Template
This template demonstrates a way to build web API application on lambda with vingle-corgi
Initial sample is simple backend for service health system like https://status.slack.com/# Commands
## npm run build
Build entities schema for open-api spec, also build TSC
```
"build:tsc": "rm -rf dst && tsc",
"build": "npm run build:tsc",
```## npm run lint
## npm run run-local:api
this run vingle-corgi locally, by simulating the behavior of API Gateway with express## npm run deploy
npm run deploy:stage
npm run deploy:prod## npm run info
npm run info:stage
npm run info:prod# Logging
1. Set service, function information to catch-log's definitions.json
- service means service attribute in service's serverless.yml
- function menas child attributes of function attribute in service's serverless.yml
2. Deploy catch-log
3. Adding log for service
4. Deploy service# OpenAPI
This template automatically generates OpenAPI3.0 spec, which means you can generate API client
once you deploy the application with npm run deploy:prod or npm run deploy:stage, you'll get the url like this
https://p0iiz3t3ek.execute-api.us-east-1.amazonaws.com/stage/
than you can get the generated OpenAPI spec for https://p0iiz3t3ek.execute-api.us-east-1.amazonaws.com/stage/open-api# CI
this repo supports both Github Actions / CircleCI