Skip to content

Commit c6ce4d1

Browse files
committed
adding minimal demo
1 parent e8179df commit c6ce4d1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

demos/minimal.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* global Response */
2+
const http = require('../index')
3+
4+
const { router } = http({})
5+
6+
router.get('/hi', async (req) => {
7+
return new Response('Hello World!')
8+
})
9+
10+
module.exports = {
11+
port: 3000,
12+
fetch: (request) => router.lookup(request)
13+
}

0 commit comments

Comments
 (0)