@futurert/rescript-koa-router

0.0.1-beta.1 • Public • Published

Rescript-Koa-Router

install

npm install @futurert/rescript-koa-router @koa/router @futurert/rescript-koa koa

This command will install all koa requirements.

  • @koa/router Router middleware for Koa.

  • @futurert/rescript-koa-router rescript bindings for @koa/router

  • koa lightweight web framework for node.js, find more...

  • @futurert/rescript-koa rescript bindings for koa

How to use this?

open Router
open! Koa

let app = Koa.koa()

let router = Router.router(None)

router->get("/login", (context, next) => {
    context.body = "hello"
})

app->use(router->routes())

let _ = app->listen(8080, _ => {Js.Console.log("server is start success!")})

Just like this, you should using this router with rescript-koa, try it for fun!

Readme

Keywords

Package Sidebar

Install

npm i @futurert/rescript-koa-router

Weekly Downloads

0

Version

0.0.1-beta.1

License

MIT

Unpacked Size

40.9 kB

Total Files

9

Last publish

Collaborators

  • dolphinjs