https://github.com/hiroppy/express-routes-list
Confirm routing on the terminal.
https://github.com/hiroppy/express-routes-list
Last synced: about 1 month ago
JSON representation
Confirm routing on the terminal.
- Host: GitHub
- URL: https://github.com/hiroppy/express-routes-list
- Owner: hiroppy
- License: mit
- Created: 2017-07-23T23:16:11.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-08-17T02:49:59.000Z (almost 6 years ago)
- Last Synced: 2025-09-15T18:38:32.656Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 79.1 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# express-routes-list
Confirm routing on the terminal.
## Install
```
$ npm install express-routes-list --save-dev
```
## Usage
```javascript
'use strict';
const express = require('express');
const app = express();
const routesList = require('express-routes-list');
app.get('/', (req, res) => {
res.send('Hello World');
});
app.post('/', (req, res) => {
res.send('Hello World');
});
app.post('/test', (req, res) => {
res.send('Test');
});
app.post('/test/:id', (req, res) => {
res.send('Test');
});
// add
if (process.env.NODE_ENV === 'development') {
routesList(app);
}
app.listen(3000);
```
```sh
$ npm start
# you should write to package.json as a npm script
# "express-routes-list": "express-routes-list"
$ express-routes-list
```
1. run your express application
2. run express-routes-list
