3 ms·
// Add the route server.addRoute({ method: 'GET', path: '/hello', config: hello }); I'm sorry but how is that different than app.get('/hello', requi
by account_taken 14y ago
// Add the route
server.addRoute({
method: 'GET',
path: '/hello',
config: hello
});
I'm sorry but how is that different than
app.get('/hello', require('simplemath'));
where simplemath is
module.exports = function(req, res) { ... }
- account_taken 14y agonm. I didn't see the example was returning two properties. Still, that is relatively easy to do. I have a middleware that does that and it's very short not yet another framework.