Hosting a local web server using node js.
Home › Forums › Conduit: AEP Model › Hosting a local web server using node js.
- This topic has 6 replies, 2 voices, and was last updated 8 years, 7 months ago by
Jeff Hatch.
-
AuthorPosts
-
September 9, 2016 at 7:25 pm #14741
Ajay K
ParticipantI was wondering if i can host a local web server on a specific port on the AEP model. So I can access this from node-red application and was hoping to separate it from the node-red application process. Its a nodejs application and would serve more as a web api for internal housekeeping of the eventual application that we are building.
Thanks,
Ajay.September 12, 2016 at 8:48 am #14747Jeff Hatch
KeymasterAjay,
It is possible to host your own web server on the AEP Conduit. Support for custom applications will gain a big boost in the upcoming AEP 1.3 release with a new framework for building custom applications that is described here:
You can use this framework if you need to upon the release of AEP 1.3 or you can install your nodejs application per the usual procedure. However if you install nodejs modules in the flash, they will be overwritten when the unit is upgraded. Use of the new framework will re-install the application after the device firmware has been upgraded.
The other thing you will need to address is adding firewall rules to allow the incoming connections to your web server. Also, keep in mind that the AEP Conduit Web UI uses ports 80 and 443, and that the Node-RED development page uses port 1880.
Jeff
September 12, 2016 at 11:11 am #14748Ajay K
ParticipantThanks so much Jeff for taking the time to respond in detail. When is the AEP 1.3 release due to be out? Also I may have asked this question before what is the supported version of nodejs on this platform? With the custom applications would they have to be deployed via Device HQ?
Thanks,
Ajay.September 12, 2016 at 12:53 pm #14753Jeff Hatch
KeymasterAjay,
AEP 1.3 should be out before the end of this month. It is in the final stages of testing.
At this time, due to hardware architectural limitations, the Conduit is restricted to running only 0.10.x versions of Node.
Yes, the custom applications will be able to be deployed from DeviceHQ. Once AEP 1.3.x is released there is a sample Node application that we have been using in-house to test with that we call “express-hello-world” that is a simple web server app that you could probably use as a reference.
The only additional hardware requirement for custom applications is the need to have an SD Card inserted in the device.
Jeff
September 12, 2016 at 7:38 pm #14756Ajay K
ParticipantThanks Jeff for the information.
September 20, 2016 at 9:52 pm #14815Ajay K
ParticipantHey Jeff,
You mentioned the following in your last post:
“Once AEP 1.3.x is released there is a sample Node application that we have been using in-house to test with that we call “express-hello-world” that is a simple web server app that you could probably use as a reference.”Can you point me to his express-hello-world sample?
Thanks,
Ajay.September 26, 2016 at 8:15 am #14837Jeff Hatch
KeymasterAjay,
At the bottom of http://www.multitech.net/developer/software/aep/creating-a-custom-application/ we have now posted some example apps. The express-hello-world sample app is there.
Sorry it took so long.
Jeff
-
AuthorPosts
- You must be logged in to reply to this topic.