express js list all routes

JavaScript
const listEndpoints = require("express-list-endpoints"); // npm i express-list-endpoints
console.log(listEndpoints(app)); // where app = express();
Source

Also in JavaScript: