From 9dd45c528d6f614e7f73340ce87741f24929f26a Mon Sep 17 00:00:00 2001 From: Muthu Kumar Date: Fri, 11 Feb 2022 03:05:57 +0530 Subject: [PATCH] doc(hyperserve): README Signed-off-by: Muthu Kumar --- serve/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 serve/README.md diff --git a/serve/README.md b/serve/README.md new file mode 100644 index 0000000..0140b6c --- /dev/null +++ b/serve/README.md @@ -0,0 +1,17 @@ +# hyperserve + +Part of the [hyperactive](https://github.com/feathers-studio/hyperactive) project. A lean server library that's functional by design and integrates seamlessly with hyperactive itself. + +## Getting started + +```TypeScript +import { http, router, get } from "https://deno.land/x/hyperactive/serve.ts"; + +const server = http({ port: 3000 }, router( + get("/", ctx => ctx.respond("Hello world")), + ... +)); + +server.start(); +console.log("Listening on port", 3000); +```