Skip to content

Commit 078354b

Browse files
Update README
1 parent 67ecf16 commit 078354b

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
11
# ⚡ zap
2+
3+
Zap is a lightweight HTTP server framework for Node.
4+
5+
## Installation
6+
7+
Install with your favorite package manager:
8+
9+
```shell
10+
$ yarn add zap
11+
$ pnpm add zap
12+
$ npm install zap
13+
```
14+
15+
## Usage
16+
17+
```typescript
18+
import {route, router, serve} from 'zap'
19+
20+
const app = router(
21+
route('GET', '/', () => 'Hello World'),
22+
23+
route('GET', '/hello/:name', (req) => `Hello ${req.params.name}`),
24+
)
25+
26+
const server = http.createServer(serve(app))
27+
server.listen(3000)
28+
```
29+
30+
## License
31+
32+
MIT License, see `LICENSE`.

0 commit comments

Comments
 (0)