#1 Product of the week · Launched January 17, 2023
Node File Router

Node File Router

A file-based routing for Node.js. Works with pure Node.js, Bun, Express.js, ws, and more! 💫

Visit website

FreeOpen Source77,090 impressions#1 of its week1 comment

Comments

>log in to comment
  • Alex Panov· 3y ago

    Wow, great idea! I tried it out in my side-project

The library allows you to define your Node.js API using files. It has the same interface as Next.js and Nuxt. Examples: 1. /collections/12/products/25/ -> file: api/collections/[cid]/products/[pid].ts 2. /catalog/women/denim/black/ -> file: api/catalog/[...categories].ts 3. POST:/profile/favourites/ -> file: api/profile/favourites.[post].ts

Node File Router lets you define a Node.js API with file-based routes, similar to Next.js or Nuxt.

for
Node.js developers who want simple, framework-agnostic routing.
pricing
open source
license
MIT
Danilqa/node-file-router 207 8TypeScriptupdated 8 months ago
works withNode.jsBunExpress.jsWebSocketsES modulesTypeScript

Key features

4 features of Node File Router
  • Technology Agnostic — Works with pure Node.js, Bun, Express.js, WebSockets and more.
  • Works Everywhere — Supports CommonJS, ES modules and provides TypeScript out of the box.
  • Powerful Routing — Dynamic routes with wildcard parameters using a Next.js-like interface.
  • Zero Dependencies — No external packages and 100% test coverage.

Use cases

  • Create REST endpoints by adding files like api/collections/[cid]/products/[pid].ts
  • Handle dynamic paths such as /catalog/women/denim/black via catch-all routes
  • Build APIs that run on multiple runtimes (Node, Bun, Express, WebSockets) without code changes
  • Leverage TypeScript support for type-safe route handlers

Node File Router vs alternatives

Node File RouterWunderGraphKeelDaytonaFluent CI
Best forFile-based routing for Node APIsAPI composition platformBackend-as-a-serviceDev environment provisioningTypeScript CI/CD pipelines
PricingOpen sourceFreeSubscriptionFreeFree
DevHunt upvotes1233846339158
LaunchedJan 2023Jan 2023Mar 2024May 2024Jan 2024

Node File Router FAQ

How are routes defined?+

Routes are created by adding files in an api folder; the file path maps to the URL pattern, e.g., api/collections/[cid]/products/[pid].ts → /collections/12/products/25/.

Which runtimes does it support?+

It runs on pure Node.js, Bun, Express.js, WebSockets and other environments.

Do I need to install any dependencies?+

No, the library has zero dependencies.

Is TypeScript supported?+

Yes, the library works with TypeScript out of the box.

Summarized by DevHunt from danilqa.github.io · Sep 27, 2026. Details may change; check the official site.