#1 2017-02-27 11:59:52

eduardoalfaro
Member
Registered: 2016-06-08
Posts: 37

Apache Cordova HTTP tiny web server

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

Offline

#2 2017-02-27 13:25:09

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Apache Cordova HTTP tiny web server

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.

Offline

#3 2017-02-27 19:24:17

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Apache Cordova HTTP tiny web server

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.

Offline

#4 2017-02-28 15:21:45

eduardoalfaro
Member
Registered: 2016-06-08
Posts: 37

Re: Apache Cordova HTTP tiny web server

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

Offline

#5 2017-02-28 15:23:24

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Apache Cordova HTTP tiny web server

Hello Eduardo,

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

Offline

#6 2017-02-28 21:15:17

edunt
Member
Registered: 2015-12-21
Posts: 258

Re: Apache Cordova HTTP tiny web server

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!

Offline

#7 2017-02-28 22:41:44

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Apache Cordova HTTP tiny web server

Hello to all,

edunt wrote:

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. smile

Offline

#8 2017-03-01 13:27:19

svanneste
Member
From: Paris, France
Registered: 2015-05-27
Posts: 155

Re: Apache Cordova HTTP tiny web server

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

Offline

#9 2017-03-01 13:34:32

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Apache Cordova HTTP tiny web server

Hello to all,

svanneste wrote:

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.

Offline

#10 2017-03-01 14:00:29

svanneste
Member
From: Paris, France
Registered: 2015-05-27
Posts: 155

Re: Apache Cordova HTTP tiny web server

Thanks a lot David for having made my thoughts clearer smile

Offline

#11 2017-03-01 14:01:32

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Apache Cordova HTTP tiny web server

Hello!

svanneste wrote:

Thanks a lot David for having made my thoughts clearer smile

No problem! smile

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.