0

So I have a static file server ( NanoHTTPD ) running inside my android app which serves a react web build on a localhost

Is this configuration reliable or not ?

  • What do you consider reliable? – blackapps Feb 26 '20 at 19:38
  • What do you consider to be a localhost? – blackapps Feb 26 '20 at 19:39
  • @blackapps reliable as in less possibility for crashes and stuff – Catastrophy Feb 26 '20 at 19:42
  • @blackapps also by localhost i mean localhost of android. Does that make sense ? – Catastrophy Feb 26 '20 at 19:43
  • Every device is its own localhost. So yes. But why 'a' localhost. Different from the nanohttpd device,,? And what is the function of that build? Why are you naming it? I do not understand your setup. – blackapps Feb 26 '20 at 19:47
  • No the same device. The build is made for web and like requires a static file server to function ( render let's say ). I'm naming it just for reference purpose if someone has worked on react then they would know I'm assuming, But anyhow the setup was made so because of cost constraints so we have these sorta duplex communication bridges between webview and js. It's supposed to make UI development faster and it is good at that but the question for reliability still kinda bugs me. – Catastrophy Feb 26 '20 at 20:58
  • Your file server serves files. Ok. But what about that build? What has it to do with those files? What has it built? Those files? Then why didnt you tell? And how would reliability depend on the builder of the files? – blackapps Feb 26 '20 at 21:11
  • The build has the bundled React app files which are served on the server. The reliability does not depend on the builder of the files ( webpack ). I'm curious about if the rest of the setup could give any fatals in production. – Catastrophy Feb 26 '20 at 23:10
  • Reliable? Your Android device will soon go in sleep mode and is then unreachable. Further it needs wifi. – blackapps Feb 27 '20 at 07:36
  • Those files are served to other Android devices in the network? And to pc's running in that network? – blackapps Feb 27 '20 at 07:38
  • No it does not need any internet connection. The files are only served to the webview and nothing else. – Catastrophy Feb 28 '20 at 09:49
  • To the webview? Is there a webview? You did not tell before. And that webview is in the same app as the nanohttpd server? If so, then i wonder why you need a webserver. I also wonder what kind of files you serve. If it is html, js, or css you could just let the webview load them from disk. It is a pitty that you did hardly tell anything about your setup and still expect us to tell you if what you did is reliable. – blackapps Feb 28 '20 at 10:18
  • Dude look if I have a static file server and I mention react then I'm serving web pages and when I say localhost that means that it ain't externalised to be accessed from anywhere outside the app that means only my app uses it which also means that the webview is only option for this setup to be useful. Imma leave ya at that. – Catastrophy Mar 03 '20 at 09:09
  • Yo and just so you know answering is voluntary Mr. "It-is-a-pitty-that-you-did-hardly-tell-anything-about-your-setup" – Catastrophy Mar 03 '20 at 09:11

0 Answers0