A minimalist NodeJS REST API powered by an OpenAPI spec
See our blog post about this repository.
- Generate the OpenAPI spec in the
api
package.
yarn --cwd packages/api
yarn --cwd packages/api gen
- Generate the Typescript client in the
api-client
package.
yarn --cwd packages/api-client
yarn --cwd packages/api-client gen
- Boot up the api
yarn --cwd packages/api dev
- Test requests on the api
# get the api spec
curl http://localhost:8080
# register a user
curl -d '{"name":"Rahul Ligma","email":"rahul@twitter.com"}' -H "Content-Type: application/json" -X POST http://localhost:8080/user/register