c# - How can i call my node js sever method on vm server from my local machine through ip address? -


i have node.js server hosted on vm server in iis .

i want call node server api local machine using asp.net through local machine ip address , port enable call node.js api. posted below code :

// below node js sever js api method app.get("/stream", function (request, response) {  });  // below code call node.js sever api method local machine string url = "http://213.*.*.*:port/stream"; httpwebrequest request = (httpwebrequest)webrequest.create(url); httpwebresponse response = (httpwebresponse)request.getresponse(); 

you need provide full ip address , port number, , not 213.*.*.*:port.

log vm , find out ip address. port should obvious code port listening on (typically 3000).


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -