nodemcu-firmware icon indicating copy to clipboard operation
nodemcu-firmware copied to clipboard

Add WebServer on top of httpserver for authentication handling of several routes

Open HHHartmann opened this issue 6 years ago • 6 comments

Missing feature

There have been several calls for a WebServer lately. Reference to our httpserver.lua or https://github.com/marcoskirsch/nodemcu-httpserver or #2957

Our httpserver.lua is sophisticated in using output buffering and having a flexible interface. But it does not do anything out of the box, so I aim to have a WebServer which can be configured to serve static files with one line. Equally simple it can be configured to call dynamic APIs.

It will be easy to write and integrate individual filters, authentication, redirects or whatever middle-ware is needed.

Configuration will be similar to nodemcu-espress. I might also use their plugins and adapt them to our API.

Justification

Easy way to serve some pages. @TerryE @marcelstoer @pjsg Do you think this is the right repo or should I put it in my own. This would include several files for the core WebServer and some plugins.

Workarounds

Everybody write their own

HHHartmann avatar Nov 22 '19 20:11 HHHartmann

Amazing (or scary?) how many HTTP servers there exist for NodeMCU - I had no idea. This despite our FAQ stating

If you are trying to implement a user-interface or HTTP webserver in your ESP8266 then you are really abusing its intended purpose.

I don't have any preference as to where you are going with this code. Not having to maintain an HTTP module at all would also be fine i.e. we remove ours and link to yours instead.

marcelstoer avatar Nov 22 '19 22:11 marcelstoer

@Gregor,

.But it does not do anything out of the box, so I aim to have a WebServer which can be configured to serve static files with one line. Equally simple it can be configured to call dynamic APIs.

This was the idea when i wrote this. https://github.com/NiklausS/nodemcu-firmware/blob/Webserver/docs/modules/httpd.md

I've also done some simple test with authentication. But as it is not secure, i didn't follow this further.

NiklausS avatar Nov 23 '19 11:11 NiklausS

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 19 '20 03:11 stale[bot]

I will eventually continue my work. Please have a bit more patience.

HHHartmann avatar Nov 20 '20 17:11 HHHartmann

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 08:04 stale[bot]

Need to make a pr for this

HHHartmann avatar Apr 18 '22 20:04 HHHartmann