jh3141 / cordova-plugin-httpserver-dynamic

A plugin for Apache Cordova that runs a web server that is able to serve dynamic content.
5 stars 2 forks source link

Specific Use case #1

Closed arjunmenon closed 6 years ago

arjunmenon commented 6 years ago

Hey When you say dynamic content, can it also serve files from the phone? Also, maybe using Jetty would be nice, since Nanohttpd does not support any custom HTTP method.

jh3141 commented 6 years ago

The content can be anything generated by a javascript function you pass to it; using file access APIs you could use it to serve files from the phone (although there are existing and more mature solutions that do this, so it would probably be better to find one of those).

As to using Jetty, it would be nice, but it would somewhat increase the size of the app, and would be harder to interface with, so I'll probably stick with nanohttpd for now.

The use case I wrote this for was running integration tests for apps isolated from their backend servers, but I'm sure there are plenty of other ways it can be used.