windows azure sdk localhost for node.js - node.js

I am running a helloworld program using node.js and windows azure sdk.
If I keep : 127.0.0.1:81
This link works and I get the hello world printed on the browser.
But when I try:
--http://192.168.1.6:81/
This link is not working. 192.168.1.6 is the localIP of the machine I am running this application.
Can you please let me know how I can get this working with a IP address
I have the node.js helloworld application from:
http://www.windowsazure.com/en-us/develop/nodejs/tutorials/getting-started/
before I deploy this in cloud I want to run my application with the IP address of the host

The compute emulator specifically binds to 127.0.0.1 and not any other IP addresses, so there's no easy way to do this. (Workarounds like port forwarding are possible, but I wouldn't recommend doing it unless you have a good reason why you have to.)

Related

getting issues while trying to call api (local host) from real ios device(Mac OS)

first, I run the nodeJs server on localhost
then I tried to call API's from my real ios device, but I’m getting issues while connecting with local host
everything in working fine in case of android device and emulator
Try binding the backend on 0.0.0.0 if you want to test from a different device, but in the same network. The 0.0.0.0 will listen on all network interfaces where localhost might only listen to your local loopback net device.
You should also point to your network address where the backend is running from your iOS device.
You may find this other stack overflow question helpful.
That localhost URL would make the iPhone try to reach out to itself, you need to set that variable to an IP or URL that the iPhone can actually reach out to. You may find it helpful to use a tunnelling service like ngrok which will make an external URL that your server's localhost can be reached at.

Is there a way to host a node.js server without a public IP?

I've made a simple Node.js app that i can host locally and using services like evennode. Now I want to do this on my home PC and it seems like a simple task to do - just port forward and get a domain name.
However, my problem is that i don't have a public IP. My ISP uses private/dynamic IP addresses which makes hosting impossible(?).
Is there a program or service that can fix my problem? I've found some for Apache/SQL servers but nothing for Node.js

Node.js on Google Compute Engine

I have established ssh connection. Following that, I have run my node.js application by node app.js on port 3000. It showed console output app is running http://0.0.0.0:3000 port same as my local environment. But when I opened http://external_ip:3000 it is not loading anything. How do I have to run my node app on external ip address
First of all you must have to reserve a static external IP for your VM. If you want to check whether your project is running or not open this following link.
https://[PROJECT-ID].appspot.com
Here is the guide for assigning a static external IP to a VM.
https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address

If I use http-server with node can other devices on my network access it?

Background
I am building a site using angularjs and want to make sure that its displaying properly on my phone. I'm aware of the Google Chrome emulator but would like to show people it directly on the phone.
Node.JS
I'm using http-server . to run a server at the base of my app. This was the quickest and easiest way of getting a server for local testing.
I have tried going onto the same network via wifi on my phone and then trying to get to localhost:8080 but it just gives me a "this web page is not available" error
Question
My question is, is there a way to get my web app on my phone with http-server . or do I need to set up a proper web-server? I thought maybe it would just be simple to get it on any device attached to the same network.
Since our application(server) and devices(in which you want to access the application) running on same network.
You can access this with the help of IP address.
Let say, your app is running on
192.168.1.1:3000
So you can access it as localhost:3000 on local machine.
And as 192.168.1.1:3000 on devices which is using the same network.
any device can access to server. Use ip in device not use localhost
Use ngrok https://ngrok.com/ , ngrok expose your localhost behind a NAT or firewall to the internet , easy to use , after install just type on command line ;
ngrok 7070
then it gives you a link like ; 3g87g9g.ngrok.com
Use ifconfig utility if you are in linux or use any other tool to get the ip address of your phone (Web server), for example 192.168.1.10 is IP address of the phone.
You can access the web page from any other device in the network by going to 192.168.1.10:8080 in the browser.
Note that 8080 is the port to your server application, you select the port from node.js

What is the best way to test a video chat application locally?

If I am running a local server that is hosting a video chat application what is the best way to test the application with another user? Lets say I have two computers, is there a way I can allow computer B to connect to the local server that is running on computer A? The goal is to simply test whether the video chat application works properly in two completely different browsers running on separate computers. If there is a way I can trick the app into thinking the computer that is running the local server is another host, please let me know.
But Remember that the app needs access to the computers webcam. Thanks!
Addition Info: Nodejs application that uses the Tokbox, express, and socket.io APIs
Just make sure your web server is listening on a routable IP like "0.0.0.0", which you specify when you call http.createServer(port, ip, handler). Then point the browsers at the server's IP address such as http://192.168.1.1:3000 (fill in your specific IP and port). You can use the command ifconfig -a on linux or osx to get your server's local IP address, and ipconfig on windows.

Resources