APIs.
The code of my component is something like:
var api1 = require('./api1');
var api2 = require('./api2');
var component = { api1: api1, api2: api2 };
module.exports = component;
--------------------
api1 is something like this:
var api1 = { testFunc: function(stuff,callback){ // do http request &
callback(result) } }
module.exports = api1;
--------------------
I've one endpoint on nodejs where i'm trying to use this component, like
this:
var component = require('../../component');
component.api1.testFunc(1, function(result) {return res.json(200,
result.data);});
--------------------
It works fine for the first time. On the second call i have no response
from server.
Newbie here. Can someone help me please?
Thanks in advance
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/43a91f03-1e4d-4aac-8c3a-55715ffe47d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.