Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
docs: make sneak peek more representative
Browse files Browse the repository at this point in the history
  • Loading branch information
boywithkeyboard committed Sep 4, 2023
1 parent d70410f commit b49b7ba
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,24 @@

<br>

### Sneak Peek 🤫
### Sneak Peek 👾

```ts
import cheetah from 'https://deno.land/x/cheetah/mod.ts'
import { z } from 'https://deno.land/x/zod/mod.ts'

const app = new cheetah()
.get('/', () => 'Hello World')
.post('/', {
body: z.object({ // < scheme validation
name: z.string()
})
} c => {
const body = await c.req.body()

app.serve()
return `Hey, ${body.name}!` // < response body
})

app.serve() // < launch app
```

❔ Please read our [guide](https://cheetah.mod.land) or [join our Discord](https://discord.gg/2rCya9EWGv) to learn more.
Expand Down

0 comments on commit b49b7ba

Please sign in to comment.