Skip to content

A minimalist NodeJS REST API powered by an OpenAPI spec

License

Notifications You must be signed in to change notification settings

IcePanel/ice-openapi-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ice-openapi-node

A minimalist NodeJS REST API powered by an OpenAPI spec

See our blog post about this repository.

Getting started

  1. Generate the OpenAPI spec in the api package.
yarn --cwd packages/api
yarn --cwd packages/api gen
  1. Generate the Typescript client in the api-client package.
yarn --cwd packages/api-client
yarn --cwd packages/api-client gen
  1. Boot up the api
yarn --cwd packages/api dev
  1. 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

About

A minimalist NodeJS REST API powered by an OpenAPI spec

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published