jxcore / jxcore-cordova

JXcore / Node.JS plugin for Apache Cordova / PhoneGap
Other
233 stars 68 forks source link

How to use Express Routes with iOS #80

Open digitaledge opened 8 years ago

digitaledge commented 8 years ago

Hello, is it actually possible to render pages from the Express Server right within the ios app?

Actually cordova drops an error "index.html not found" using simple routings like with the code below:

router.get('/', function(req, res, next) {
    res.render(views/index2.html');
});
ktrzeciaknubisa commented 8 years ago

You mean index2.html perhaps? Will that work for you: "./views/index2.html" or __dirname + "/views/index2.html" ?

digitaledge commented 8 years ago

Im trying to get the app loading a page served by express on startup.

We are testing to port a browsergame to jxcore wich required web workers on the frontend. My hope is that this becomes possible with jxcore, since cordova does not work with them because the application is not loaded from a server url with it (security issue).

ktrzeciaknubisa commented 8 years ago

Generally there is no problem with Express on iOS. You may see the samples of jxcore-cordova repo.

If you can prepare a minimal sample that we can use for reproduction of the problem (with dependency list), that would help us.