webOS Nation Forums >  webOS apps and software >  webOS development > accessing local server with emulator
accessing local server with emulator

  Reply
 
LinkBack Thread Tools Display Modes
Old 11/06/2010, 03:33 PM   #1 (permalink)
Member
 
Join Date: Nov 2009
Posts: 18
Likes Received: 0
Thanks: 10
Thanked 0 Times in 0 Posts
Default accessing local server with emulator

Is it possible to access a local server on my computer using an ajax request on the emulator? What about on a device plugged into USB?

I know how to access remote pages now with ajax, but would like to develop a cloud type program on my local machine.
Jared5755 is offline   Reply With Quote
Old 11/06/2010, 03:40 PM   #2 (permalink)
Member
 
Join Date: Jun 2009
Location: Silicon Valley
Posts: 787
Likes Received: 30
Thanks: 3
Thanked 102 Times in 67 Posts
Default

If you run a local server all you need is to access the ip address your computer has.
__________________
Apps: MyQ for Netflix (Phone/TouchPad), Giantbomb (Phone), Excavate (Reddit/Digg clients for TouchPad)
mosdl is offline   Reply With Quote
Old 11/06/2010, 03:59 PM   #3 (permalink)
Member
 
Join Date: Nov 2009
Posts: 18
Likes Received: 0
Thanks: 10
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by mosdl View Post
If you run a local server all you need is to access the ip address your computer has.
That would defeat the purpose of me running a "local" server. I want to keep everything local. i.e. develop offline.
Jared5755 is offline   Reply With Quote
Old 11/06/2010, 10:39 PM   #4 (permalink)
Member
 
Join Date: Jun 2009
Location: Silicon Valley
Posts: 787
Likes Received: 30
Thanks: 3
Thanked 102 Times in 67 Posts
Default

Quote:
Originally Posted by Jared5755 View Post
That would defeat the purpose of me running a "local" server. I want to keep everything local. i.e. develop offline.
Then you can use probably use BlackBerry Forums at CrackBerry.com or BlackBerry Forums at CrackBerry.com
__________________
Apps: MyQ for Netflix (Phone/TouchPad), Giantbomb (Phone), Excavate (Reddit/Digg clients for TouchPad)
mosdl is offline   Reply With Quote
Old 11/06/2010, 11:59 PM   #5 (permalink)
Homebrew Developer
 
Join Date: Aug 2009
Location: Midlothian, VA
Posts: 1,218
Likes Received: 8
Thanks: 1,046
Thanked 485 Times in 260 Posts
Default

Quote:
Originally Posted by Jared5755 View Post
That would defeat the purpose of me running a "local" server. I want to keep everything local. i.e. develop offline.
mosdl wasn't saying your external IP, but rather your internal IP address.

As in:

you are on a router, and the following is your IP table (note, this is an exception):

your computer - 192.168.0.3
your phone - 192.168.0.4
your emulator - 10.0.0.10 (the emulator runs on in the 10.x block as it is handled by VirtualBox)

So, inside your emulator and phone you should be able to send a request to http://192.168.0.3
__________________
Arthur Thornton
webOS Application Engineer, Appstuh
Writer, webOS Nation

My Websites:
http://www.arthurthornton.net
My apps:
Sparrow for Twitter
Voice Memos
Arthur Thornton is offline   Reply With Quote
Old 11/07/2010, 07:11 AM   #6 (permalink)
Member
 
Join Date: Nov 2009
Posts: 18
Likes Received: 0
Thanks: 10
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by arthurthornton View Post
mosdl wasn't saying your external IP, but rather your internal IP address.

As in:

you are on a router, and the following is your IP table (note, this is an exception):

your computer - 192.168.0.3
your phone - 192.168.0.4
your emulator - 10.0.0.10 (the emulator runs on in the 10.x block as it is handled by VirtualBox)
I see where the confusion is. I guess I didn't mean "local" as in on my network. I want to access the sever running on the same computer and not go through a router. On my computer I use localhost. That wouldn't work on the emulator though since it's a different OS.

Maybe this isn't possible.

Thanks for the help guys.
Jared5755 is offline   Reply With Quote
Reply

 

Tags
ajax, server

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0