I am new to flutter and I am trying to build an Android application that requires me to host a HTTP Server on a certain directory of the Android filesystem which would allow me to host the files in the directory on the HTTP server, similar to how Python3's http.server
works. I have looked through the HttpServer class but I can't seem to find anything that satisfies what I need.
Asked
Active
Viewed 234 times
0

Kevin Christopher Henry
- 46,175
- 7
- 116
- 102

Alloysius Goh
- 141
- 1
- 1
- 6
-
@pskink sorry, updated the question – Alloysius Goh Mar 27 '20 at 07:43
-
@pskink sorry I misread your comment. I'm trying to go for an app that allows the user to choose the directory to host using some sort of list and activate the server using a button – Alloysius Goh Mar 27 '20 at 07:50
-
@pskink I'm not asking for the whole app. I'm just trying to give you an idea of what I'm trying to accomplish. I'm just looking for pointers of how I can write the app because I'm new to flutter. – Alloysius Goh Mar 27 '20 at 07:54
-
`host a HTTP Server on a certain directory `. What do you mean? Indicating the server its `document root`? – blackapps Mar 27 '20 at 08:17
-
@blackapps yes. the directory will serve as the HTTP server root – Alloysius Goh Mar 27 '20 at 08:20
-
Have you got the server working? If yes then from wich directory does it serve now? By default? – blackapps Mar 27 '20 at 08:22
-
You can use VirtualDirectory: https://stackoverflow.com/a/20320506 – elsamuko Apr 17 '20 at 12:17