How to run a Monkey app as a localhost app ?
Community Forums/Monkey Talk/How to run a Monkey app as a localhost app ?
| ||
All, I'm currently playing with Monkey, Ajax and XAMPP, only HTML5 apps. So far I can use Ajax calls in my Monkey code, and it works, but only if I run the app inside my XAMPP domain. If I run the monkey app from within the Monkey IDE, any HTTP request won't work, because the app should be ran inside the browser, with an URL like localhost://monkey/myMonkeyAjax.html instead the default one file:///C:/monkey/MonkeyAjax/myMonkeyAjax.html. Is there any way to instruct the IDE, to 'run' the app like an HTTP address instead of a file:/// address ? Hope you get what I mean :) Regards, Sergio. P.S. could you please move this message to the more appropriate Monkey Discussion forum ? Last edited 2011 |
| ||
Yeah this would be nice. Personally I just keep the browser window open on the correct file and hit "Compile" and not "Compile and Run". |
| ||
This is a nice tip, thanks ! Sergio. |
| ||
IDE Options -> Internal HTTP Server located on localhost:8080 |
| ||
Yeah I've noticed that, John, but it does not do what I need, I mean, the IDE calls the browser with a local file:///... instead of localhost://... even with that option set. Or am I missing something obvious ? Sergio. |
| ||
localhost://monkey/myMonkeyAjax.html you mean : http://locahost:port/monkey/myMonkeyAjax.html (change "port" to your site's port. leaving :port out will take the default) If your problem is that LH is not being resolved at all make sure you have the line: 127.0.0.1 localhost in your hosts file (its either in system32 or system32/drivers) You should not need it, but sometimes you do. Last edited 2011 |
| ||
I need to be able to specify a hostname and path within each project - I wonder if this would be possible at some point? |