Export the app (regardless of where you are declaring it).
//app.ts
export default app;
Create a configuration file:
//route-list.ts
import { configure } from 'express-route-list';
import app from './app';
configure(app, { showIndex: true, prefix: '' });
You can use tsx or ts-node to execute this script.
npm pkg set scripts.route-list="tsx route-list.ts"
npm run route-list