app.get('/first', require('./handler1').get);
app.get('/second', require('./handler2').get);
exports.get = funtion(req, res, next) {
// и здесь как-то получить переменную
}
const handler1 = require('./handler1');
const handler2 = require('./handler2');
app.get('/first', handler1.get.bind(handler1, {myParam: "Hello"}));
app.get('/second', handler2.get.bind(handler2, {myParam: "World"}));
exports.get = function(share, req, res, next) {
console.log(share.myParam);
}