Skip to main content
Home

A lightweight, flexible routing library for JavaScript.

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
76%
Published
a year ago (0.3.2)
interface PathlessInstance

Call Signatures

(
req: http.IncomingMessage,
res: http.ServerResponse,
): void

Properties

listen: (
port: number,
callback?: () => void,
) => http.Server
get: (
path: string,
handler: RouteHandler,
) => void
post: (
path: string,
handler: RouteHandler,
) => void
put: (
path: string,
handler: RouteHandler,
) => void
delete: (
path: string,
handler: RouteHandler,
) => void
patch: (
path: string,
handler: RouteHandler,
) => void

Methods

use(middleware: MiddlewareFunction): void
use(
path: string,
routerOrMiddleware: Router | MiddlewareFunction,
): void

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@pathless/pathless

Import symbol

import { type PathlessInstance } from "@pathless/pathless";
or

Import directly with a jsr specifier

import { type PathlessInstance } from "jsr:@pathless/pathless";

Add Package

pnpm i jsr:@pathless/pathless
or (using pnpm 10.8 or older)
pnpm dlx jsr add @pathless/pathless

Import symbol

import { type PathlessInstance } from "@pathless/pathless";

Add Package

yarn add jsr:@pathless/pathless
or (using Yarn 4.8 or older)
yarn dlx jsr add @pathless/pathless

Import symbol

import { type PathlessInstance } from "@pathless/pathless";

Add Package

vlt install jsr:@pathless/pathless

Import symbol

import { type PathlessInstance } from "@pathless/pathless";

Add Package

npx jsr add @pathless/pathless

Import symbol

import { type PathlessInstance } from "@pathless/pathless";

Add Package

bunx jsr add @pathless/pathless

Import symbol

import { type PathlessInstance } from "@pathless/pathless";