From 078354b5b88b31d9a60df02287f5c489c837c59d Mon Sep 17 00:00:00 2001 From: Jacob Gillespie Date: Sun, 4 Jul 2021 15:12:14 +0100 Subject: [PATCH] Update README --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 2770c07..d9acf39 100644 --- a/README.md +++ b/README.md @@ -1 +1,32 @@ # ⚡ zap + +Zap is a lightweight HTTP server framework for Node. + +## Installation + +Install with your favorite package manager: + +```shell +$ yarn add zap +$ pnpm add zap +$ npm install zap +``` + +## Usage + +```typescript +import {route, router, serve} from 'zap' + +const app = router( + route('GET', '/', () => 'Hello World'), + + route('GET', '/hello/:name', (req) => `Hello ${req.params.name}`), +) + +const server = http.createServer(serve(app)) +server.listen(3000) +``` + +## License + +MIT License, see `LICENSE`.