How does express reduce routing definitions?

  node.js, question

App.js in express
var routes = require(‘./routes/index’);
var users = require(‘./routes/users’);
var main = require(‘./routes/main’);
var comManage = require(‘./routes/comManage’);
app.use(‘/’, routes);
app.use(‘/main’, main);
app.use(‘/comManage’, comManage);
app.use(‘/users’, users);
You need to write a route for each page. If I have 100 pages, I will write 100 routes. I wonder if there is any way to simplify it. 3Q The Con Artists.

Although there are many, it is more efficient to specify them than to use regularization. If you think they are all placed in one file inside, you can consider route separation.