androidjs-builder icon indicating copy to clipboard operation
androidjs-builder copied to clipboard

how to test app on PC before on smartphone

Open pedefe opened this issue 3 years ago • 1 comments

Hello, I succeeds to build my first app and to run it on my smartphone. Then, because I do code errors, I wish to save time by testing a lot of functions between html page and nodejs core on my Windows PC. So I run the nodejs core with node main.js, and then I try to run the main web page. If I launch file:///C:/aDevAndroidJs/ajsTest/views/index.html, page is displayed, and dials with nodejs app. But some object like leaflet can not be used. Is there a way to launch /views/index.html in the browser with http protocol, something like "https://127.0.0.1:8080/views/index.html" ? Best regards

pedefe avatar Feb 13 '22 18:02 pedefe

if you use some sort of JS framework that should already come with a built is solution to "serve" the files. Have a look at the "scripts" in package.json -- provided you use a frontend framework like Vue

WebMechanic avatar Feb 26 '22 10:02 WebMechanic