Skip to content

Commit e00f908

Browse files
authored
Merge pull request #319 from farid-temuri/patch-2
feat: fix `route.md` example demos
2 parents ec89504 + 37b8927 commit e00f908

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

docs/essential/route.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,23 @@ import Playground from '../../components/nearl/playground.vue'
1919
import { Elysia } from 'elysia'
2020

2121
const demo1 = new Elysia()
22-
.get('/', () => 'hello')
23-
.post('/hi', () => 'hi')
22+
.get('/', () => 'Landing')
23+
.get('/hello', () => 'Hi')
2424

2525
const demo2 = new Elysia()
2626
.get('/', () => 'hello')
27-
.post('/hi', () => 'world')
27+
.post('/hi', () => 'hi')
2828

2929
const demo3 = new Elysia()
3030
.get('/get', () => 'hello')
3131
.post('/post', () => 'hi')
3232
.route('M-SEARCH', '/m-search', () => 'connect')
3333

3434
const demo4 = new Elysia()
35-
.get('/', () => 'hello')
36-
.post('/', () => 'hello')
37-
.delete('/', () => 'hello')
35+
.all('/', () => 'hi')
3836

3937
const demo5 = new Elysia()
4038
.get('/', () => 'hello')
41-
.post('/', () => 'hello')
4239
.get('/hi', ({ error }) => error(404))
4340
</script>
4441

0 commit comments

Comments
 (0)