Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.03 KB

README.md

File metadata and controls

33 lines (21 loc) · 1.03 KB

Template: worker-openapi

Deploy with Workers

This template demonstrates using the itty-router-openapi package to add openapi 3 schema generation and validation.

You can try this template in your browser here!

Setup

To create a my-project directory using this template, run:

$ npx wrangler generate my-project worker-openapi
# or
$ yarn wrangler generate my-project worker-openapi
# or
$ pnpm wrangler generate my-project worker-openapi

Local development

Run wrangler dev and head to /docs our /redocs with your browser.

You'll be greeted with an OpenAPI page that you can use to test and call your endpoints.

Deploy

Once you are ready, you can publish your code by running the following command:

$ wrangler deploy