Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Harini Chandran
#87917 Hi,

Am looking to create a local Arduino webserver using ESP8266. I want to host HTML and Javascript application in the webserver. The project will allow user to connect with Arduino using WiFi via ESP866 module and interact with the form. Upon interaction the input from user will be processed by Arduino and output will be sent back to users device.

I have found this useful tutorial on internet Arduino Webserver using ESP8266. However this tutorial uses only HTML webpage to display to user and allows it to interact with it.

What are the things I should modify to host a Javascript-HTML application instead of just HTML and how do I process the incoming data resulted from user interaction when comes to Javascript.

Any advice or lead is highly appreciated. Thanks in advance
User avatar
By quackmore
#87934 whatever platform you will be using, you'll have to build some REST API on your server
meaning that it will have to serve
+ files (statically, cause they don't change) such as HTML docs and js scripts (there is really no differences, they are just files)
+ ajax requests (dynamically, cause this is the information that need to be processed by code, such as reading sensors data or whatever)

google some of the key words above and you'll find plenty of examples
User avatar
By pangolin
#87935
quackmore wrote:whatever platform you will be using, you'll have to build some REST API on your server
meaning that it will have to serve
+ files (statically, cause they don't change) such as HTML docs and js scripts (there is really no differences, they are just files)
+ ajax requests (dynamically, cause this is the information that need to be processed by code, such as reading sensors data or whatever)

google some of the key words above and you'll find plenty of examples


Excellent point: ESPAsyncWebserver library will do all of those for you with very little code