So, I have this setup (in Express):
app.get('/mycall1', function(req,res) { res.send('Good'); }); app.get('/mycall2', function(req,res) { res.send('Good2'); });
What if I want to make an aggregate function to call /mycall1
and /mycall2
without rewriting the code and reusing the code for /mycall1
and /mycall2
?
For instance:
app.get('/myAggregate', function (req, res) {
source share