Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

routexjs/routex

Repository files navigation


Routex: Modern Node router

npm Travis CI Codecov

Documentation - GitHub

Features

  • Easy to use, good performance
  • Modern API, native Promise support, fully typed (TypeScript)
  • Close compatibility with Express/Koa, fast migration
  • Very few dependencies, small API surface, easy to fully understand and extend
  • 100% code coverage, well tested

Example

Install:

yarn add routex
# or
npm add routex

Setup your app:

const { Routex, TextBody } = require("routex");

const port = process.env.PORT || 3000;
const app = new Routex();

app.get("/", (ctx) => {
  ctx.body = new TextBody("Hello world!");
});

app.listen(port).then(() => console.log(`Listening on ${port}`));

Support

We support all currently active and maintained Node LTS versions, include current Node versions.

Please file feature requests and bugs at the issue tracker.