[UNMAINTAINED] BuckleScript bindings to the Director router
OCaml
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
README.md
bsconfig.json
package.json

README.md

[UNMAINTAINED] bs-director

BuckleScript bindings to the Director router.

NOTE: This repository is unmaintained. If you'd like to maintain it, please either make an issue in the meta repository, or bring it up in Discord.

npm i bs-director

Usage

let router =
  DirectorRe.makeRouter({
    "/": () => Js.log("Navigated to tasks list"),
    "/active": () => Js.log("Navigated active tasks list"),
    "/profile/:userid": (userid: string) => Js.log("Navigated to profile for: " ++ userid),
    "/completed": () => Js.log("Completed a task")
  });

/* Optional configuration */
DirectorRe.configure(router, {"foo": "bar"});

DirectorRe.init(router, "/");