Could any one please tell me how to integrate Apigee with Datapower using node.js

Not applicable

Could any one please tell me how to integrate Apigee with Datapower using node.js. I am using the following code in node.js. but facing error like"

{  
   "fault":{  
      "faultstring":"Script node executed prematurely: ReferenceError: \"svr\" is not defined.\nReferenceError: \"svr\" is not defined.\n at \/organization\/environment\/api\/hello-world.js:14\n at module.js:456\n at module.js:474\n at module.js:356\n at module.js:312\n at module.js:497\n at startup (trireme.js:142)\n at trireme.js:923\n",
      "detail":{  
         "errorcode":"scripts.node.runtime.ScriptExitedError"
      }
   }
}

Here is the code:

var express = require('express'); 
var app = express(); 
var fs = require("fs"); 
console.log('node.js application starting...'); 
var request = require('request'); 
request({ uri: "https://172.17.11.158:2089/globalweather.asmx?wsdl", 
	method: "GET", }, 
	function(error, response, body) { console.log(body); }); 
    svr.listen(9000, function() 
	{ var host = server.address().address 
	  var port = server.address().port console.log("Example app listening at http://%s:%s", host, port) 
    });
0 1 267
1 REPLY 1

@A.Anu Manasa - Are you still having trouble? To get past the error you pasted, change:

svr.listen(9000, function() ...

to

app.listen(9000, function() ...


Please comment further if you're still having trouble.