How to use npm i express-v4-route-list or yarn add express-v4-route-list const express = require('express'); const app = express(); const routeList = require('express-v4-route-list')(app) console.log(routeList); log would be like this