0.3.2 • Published 9 months ago

pathless v0.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Pathless

A lightweight, flexible routing library for JavaScript. Designed for simplicity, Pathless provides an intuitive API for handling HTTP requests and organizing your routes.

// CJS
const pathless = require("pathless");
// ESM
import pathless from "pathless";

const app = pathless();

app.get("/", (req, res) => res.send("Hello world!"));

app.listen(3000, () => console.log("Server is listening on port 3000"));

Features

  • Flexible Routing: Easily define routes for various HTTP methods, including support for dynamic and wildcard routes.
  • Middleware Support: Add global or route-specific middleware to handle tasks like authentication, logging, and more.
  • Modular Routers: Organize your application into reusable routers for better scalability and maintainability.

Quick Start

$ npm i pathless@latest
$ yarn add pathless@latest
$ pnpm i pathless@latest

Comparison with other frameworks

StatFramework1%2.5%50%97.5%AvgStdevMin
Req/SecPathless27,21527,21532,44733,98331,973.821,827.8727,214
Express6,4516,4518,2798,4958,023.82609.146,451
Hono28,07928,07934,39935,32733,888.731,882.3928,065

(from frolleks/nodejs-http-framework-benchmark)

Documentation

Visit the repository's Wiki.

License

MIT License

0.3.2

9 months ago

0.3.1

9 months ago

0.3.0

9 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.1.0

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago