Autodiscovering route explorer for every Express.js application.
npm install express-explorer
const express = require('express');
const explorer = require('express-explorer');
const app = new express();
//settings params is optional and these are default values:
const settings = {
format: 'html'
};
app.use('/explorer', explorer(settings));
format
:html
(default) orjson
. If param ishtml
you will get the explorer panel otherwise all discovered routes are served as a json. Even if you chose to get the html panel you can require the json format passing the query string?format=json
to the endpoint you chose for the explorer (ex./explorer?format=json
).