Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/joalisonpereira/express-route-list

List routes for Express framework
https://github.com/joalisonpereira/express-route-list

express logger-middleware nodejs

Last synced: 3 months ago
JSON representation

List routes for Express framework

Awesome Lists containing this project

README

        

# Express Route List

> List routes for Express Framework

![](./docs/badge-statements.svg) ![](./docs/badge-functions.svg) ![](./docs/badge-lines.svg) ![](./docs/badge-branches.svg)

## Install

```bash
npm i -D express-route-list
```

## Setup

If you are using Typescript in project, read [typescript setup](./docs/TSCONFIGURATION.md)

Export the app (regardless of where you are declaring it).

```js
//app.js

module.exports = app;
```

Create a configuration file:

```js
//route-list.js
const { configure } = require('express-route-list');
const app = require('./app');

configure(app, { showIndex: true, prefix: '' });
```

## Execute

Create a script entry in package.json and run.

```bash
npm pkg set scripts.route-list="node route-list.js"
```

```bash
npm run route-list
```

## Output Example

![](./docs/output.png)

## Why use this package?

This package provides a quick way to easily visualize your application's routes, with a minimal configuration.