LAN web server for testing my websites on my phone? - webserver

I am a front end web developer.
I would like a web server on my local wifi network for testing my websites on my phone. I am aware that there are several options out there but witch one would be best for quick testing of multiple websites (also a GUI would be preferable)
Thanks

What you want to do is pretty complex. You have to create and configure a DNS server then you have to configure your phone to get this DNS, etc.
If your phone is an android the best solution is to use your USB Cable and put your phone in dev mode, then you can debug your site with chrome directly on your phone.
how to: https://developers.google.com/web/tools/chrome-devtools/remote-debugging/
For iPhone i don't know if is possible. But the common solution is to use the simulator.

Related

End-to-End communication between two networks

I studied your article (CoAP) in https://www.rfc-editor.org/rfc/rfc7228.
we are developing Home automation Solution with IoT enabled devices.
I have following doubts to provide the seamlessly solution for Home Automation.
1. I have some appliance with Wi-Fi enabled controllers
2. These controllers are connected to One Standard Router (ex:- CISCO,TP-Link, D-Link). All appliance connected to one router through Wi-Fi.
3. These appliance controlled through local handheld devices by using our proprietary protocol with in the Home network.
Now, we want to give a one feature like operate these appliance by using Handheld device from Remotely.
Internet is enabled to this Router & also register one domain name.
But our problem is how to send commands or data from remote devices through Internet to home appliances.
Note:-
1.I don’t want to develop or place controller between IoT devices &
Remote handheld devices.
2. Request is initiated by remote handheld device only.
I hope, any body can guide to me for better solution.
Thanks in advance
Even if it's not a programming question I would like to make some references that can help you with decisions:
AllSeenAlliance AllJoyn Framework SmartHome Working Group. I think, it will guid you how to develop better solution.
HomeOS by Microsoft Research

How can I test an iOS App I am creating and simulate a Chinese user?

I am developing an app that will be used world-wide and have a co-worker who lives in China. He claims it takes a very long time to reach our server here in the US and I want to be able to use the app on my phone but through a VPN and proxy on my iPhone so it appears that I am in China. Is that possible?
Here you can find a list of Chinese web proxies.
You should also change your app so that it goes to through the proxy. This depends on how you are dealing with HTTP communication but if you google it, you will find many posts.
Keep in mind that a proxy will add a further delay in communication.
If you want to setup a VPN, have a look at this tutorial for setting up a VPN on your Mac and then connect the iPhone to it.

How to create a Mac/PC server app that interacts with iPhone/iPad App?

Can someone please point me in the right direction to create a Mac/PC server app that runs in the background and connects to an iPad app over the local WiFi network?
No matter how I phrase a search on Google it just brings up various apps like Remote Mouse and whatnot and no tutorials or even a hint of where to start.
I just need to send simple commands from iPad to computer over local wifi. A point in the right direction and I can likely fill in the blanks.
Thank you.
Thomas
EDIT: I am using web languages for the iPad version that I will build as a native app using open source tools.
OK, then. It actually depends on what you really need. I made the assumption you need real-time and perhaps binary data transfer.
Your best bet is to write your server application using standard C or C++ so it compiles on both as simply as possible.
If you want to avoid all the burden of writing a protocol for service discovery or asking users to enter the ip address of your server you will use a mDNS implementation for your server and your iPhone app.
If I were you I would try bonjour: http://www.apple.com/support/bonjour/
on iPhone You could start here: http://developer.apple.com/library/mac/#documentation/Networking/Conceptual/NSNetServiceProgGuide/Articles/PublishingServices.html
Once you have your sockets you will have to implement a networking protocol between your server application and your iPhone app.
You will have to be careful about byte ordering and little subtle problems with latency, disconnections and other problems inherent to networking and WiFi.
In windows you will want to register your application as a service and in Mac OS X/UNIX you'll probably want to deamonize it.
Good luck!

How to connect iPhone Safari to Windows HTTP server?

I'm completely new to the iPhone, so this is a newbie question.
The web development environment I use at work is set up on Windows 7, running Tomcat as a web server. Web Apps are tested by pointing a browser to "localhost".
I've been asked to port a web front end to the iPhone. Since I need to use this same development environment I need to connect the iPhone to the PC via USB or Ethernet.
There is this answer:
"http://stackoverflow.com/questions/3132105/how-do-you-access-a-website-running-on-localhost-from-iphone-browser"
but I was hoping to do it without wireless.
Other questions I've researched are about iPhone development, the SDK, etc. I'm not developing iPhone code, only trying to get the iPhone Safari browser to access the IP address of the local PC, 192.168.xx.xx or whatever.
Seems like it should be simple, a matter of cabling?
it would be an issue of cabling... if the iPhone had an eternet jack :)
But the wifi connection is the only "network jack" the phone has that you can connect to your own network directly with, the 3G or CDMA port gets routed via your mobile phone company, nothing you can do about that. Hence the need for WiFi to access non-routable addresses, like ...
Another option would be to make your server internet-routable, like middapark said. Then you can access it via your mobile phone provider's network and the public internet and can do away with the need to use Wifi.
A third option is to create a VPN tunnel from your iPhone to your local network, again via your mobile phone provider's network and the public internet. But I have no expereince with doing that, so I can not give further advice there.
The problem is most likely because you're trying to get your iPhone to view an internal (i.e.: not internet viewable) network. (Address such as 192.168.0.0, 172.16.0.0 and 10.0.0.0 and are non-routable as far as the internet as a whole is concerned.)
As such, unless you can access your internal network via wifi (or you're prepared to expose the machine in question to the internet, in which case you'll need to use a different IP address) this isn't possible.

iPhone - see app documents folder using wifi?

The iPhone settings have an IP address for the device when it is connected to a wifi network. Is it possible to get this IP address and establish a connection between a desktop computer (on the same network) and the iPhone?
I want to be able to transfer files between the iPhone and the desktop computer. Some apps like the "Files" and "FourTrack" apps do this.
Can someone please guide me to where I can start?
Thanks a lot for any headsup
Google for SIOCGIFCONF and you'll find a bunch of example code in C for getting all your IP addresses. Once you've enumerated your devices, on iPhone they are always in the following order: Loopback, WiFi, WAN.
Once you have that, you can implement a web server with CocoaHttpServer pretty easily. You'll have to hack it to add directory listings and the like, but it's not too hard. It's not trivial, but it's not too bad.
I think you already answered your question... you have to download an app to do this. I use "Air Sharing" and it works fine.