Apache Cordova HTTP tiny web server


Eduardo Alfaro

Hello,

I am trying to setting up this apache cordova plug-in, but I am really do not know how to proceed.

https://github.com/floatinghotpot/cordova-httpd

I have included the file at APP OPTIONS -> CORDOVA -> CUSTOM PLUGINS, and the plug-in has been installed correctly into APP folder, but I do not know how to use the functions.

The main idea is to implement a tiny http server into the APP, so I could share some files with an user inside the local-network, and the user could get the files by simply address its default browser to the APP/Device IP.

Could you help me with this issue???

Thank you so much!!!
Eduardo


DecSoft

Hello Eduardo,

What you must to include in the Cordova's Customs plugins is the plugin's ID, which in this case is "https://github.com/floatinghotpot/cordova-httpd.git" (without quotes). Once you get this ready what you must to use is the Javascript API interface provided by the plugin as is documented in the plugin's website. If you get stuck in some point, please, post here in order to try to help you.



DecSoft

Hello Eduardo,

Finally I get some free time and can prepare a little sample for you. Please, download it from here: HttpServer.zip.

As you can see (I hope!) the sample works like expected, better said, the Cordova's plugin works as expected. However, probably this sample doesn't shown nor is implemented exactly that we can do in a real application.

For example, as you can see, we update the DOM from some Javascript code, however, this is not the way in which we must work in App Builder. Certainly what we must to do is to use the Cordova's plugin's API just like we needed.

Please, Eduardo, take a look at the refered sample, and tell me two things: if they works for you, and, if they can help you in your own implementation and/or if you have any further questions.



Eduardo Alfaro

David...

I REALLY HAVE NO WORDS!!! CONGRATULATIONS!!! AGAIN!!!

Thank you so much for sharing your talent and knowledge with all of us. Your example works as expected, SO GOOD! ;-D With this HTTP embedded server, we can serve files or even pack-files compressed on ZIP or RAR from our device to any other device or computer like a PC, MAC, tablet.... using the same wireless network from our home or job, and just pointing with any browser to the given IP address and port. So simply!!!

Lots of new possibilities for the APPS created with your awesome APP BUILDER software.

Thank you VERY much!

Eduardo


DecSoft

Hello Eduardo,

Thanks for your kindly words, sir! And please, tell me if you have any further questions! :)



Ade Wale

Hi David,

To be honest, I fan you for the great work you have done and still doing. I downloaded the sample project David made by you for keep, nevertheless it will be nice if David can add the sample project with AB.

Sometime, I think David doesn't know enough how powerful AppBuilder his, If David is living in my region. I will be one of your friends. Heart off for respecting you David.

AB rock!


DecSoft

Hello to all,

Hi David,

To be honest, I fan you for the great work you have done and still doing. I downloaded the sample project David made by you for keep, nevertheless it will be nice if David can add the sample project with AB.

Sometime, I think David doesn't know enough how powerful AppBuilder his, If David is living in my region. I will be one of your friends. Heart off for respecting you David.

AB rock!

Thanks for your kindly words edunt, even when for sure I didn't deserve it. :)



Samuel Vanneste

Hello David,
Thanks a lot for that addition. May I ask you if this could mean that we could use the HTML Compiler with apps created with App Builder, now ? I am unclear on that point.
Many thanks


DecSoft

Hello to all,

Hello David,
Thanks a lot for that addition. May I ask you if this could mean that we could use the HTML Compiler with apps created with App Builder, now ? I am unclear on that point.
Many thanks

Nope Samuel. We are talking here about App Builder and some Apache Cordova pluging. HTML Compiler doesn't enters in the scene here. Certainly I am right now (what a casuality!) enhancing HTML Compiler... but not in the way that you may wanted, that, unfortunatelly is not possible.



Samuel Vanneste

Thanks a lot David for having made my thoughts clearer :)


DecSoft

Hello!

Thanks a lot David for having made my thoughts clearer :)

No problem! :)


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.