how to return response to REST api in node js
问题 I'm new to Node JS. My node js REST api route code is: 'use strict'; module.exports = function(app) { var sequel = require('../controllers/sampleController'); app.get('/task?:email', function(req, res){ res.send(sequel.listByEmail(req.query.email)); }); }; And my listByEmail function is: 'use strict'; var apiKey = '1xxxxxxxxL'; exports.listByEmail = function(emailid) { console.log(emailid); if(emailid != null && emailid != undefined) { var xyz = require("xyz-api")(apiKey); xyz.person