# Organizing Routes with express.Router

An express.Router holds one resource's routes in a file of its own, app.use("/games", gamesRouter) puts them under their path, and app.js exports the app while server.js starts it, so tests can use the app without a port.

![Cheat sheet: Organizing Routes with express.Router](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/3693a823380b491ab70b94ad305029e1.webp)

- Category: Node.js
- Level: Journeyman
- Tags: Express, nodejs, Resource (rest-api), rest-api, Router (nodejs)
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/node-express-routers-cheat-sheet
