-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nanohttpd Android: how to run a complex website on local server? #619
Comments
set the mimetype, and put your file into assets
and you can put your file like this picture |
Try this NanoHttpd Wrapper library created by me |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I have an Android app and I implemented nanohttpd. I can run some simple html code like this:
But what I want is to run a full complex website with an index.html file and many other files (namely javascript files). To be more specific, I want to run a WebGL website on a local server on my Android phone.
So, I have all the files of my website in the 'assets' folder of my apk. When the app launches, I copy all the files to the internal storage of the Android phone (to file:///storage/emulated/0/android/data/com.example.mysuperapp/files )
index.html is in /files.
How can I do if I want that http://192.168.0.26:8080/index.html runs smoothly the website located at file:///storage/emulated/0/android/data/com.example.mysuperapp/files/index.html ? (meaning that all the javascript files, imports, etc... should work properly)
If nanohttpd is not designed for that, is there any other tool to do that?
Thanks a lot for your help.
The text was updated successfully, but these errors were encountered: