Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
david-wb committed May 2, 2023
1 parent 55902da commit b429551
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,6 @@ const router = OneSchemaRouter.create({
request: z.object({ filter: z.string() }),
response: z.object({ id: z.string(), message: z.string() }),
});

// Be sure to expose your router's routes on a Koa app.
import Koa from 'koa';

const app = new Koa().use(router.middleware());

if (router.config.instrospection.router) {
app.use(router.config.introspection.router.middleware());
}

app.listen();
```

Once you have routes declared, add implementations for each route. Enjoy perfect type inference and auto-complete for path parameters, query parameters, and the request body.
Expand Down

0 comments on commit b429551

Please sign in to comment.