sixtysix

KDRouter-like router powered by page.js

Usage no npm install needed!

<script type="module">
  import sixtysix from 'https://cdn.skypack.dev/sixtysix';
</script>

README

Sixtysix

A wrapper arround page.js to provide KDRouter-like API.

Example

{ Router } = require 'sixtysix'

router = new Router

router.addRoute '/user/:id', ({ params }) ->

  { id } = params
  console.log id

router.listen()

router.handleRoute '/user/3'
# => 3

Installation

npm install sixtysix