https://github.com/SimpleSimonsSolutions/NodeMCUWebServer
NodeMCU ESP8266 WebServer
https://github.com/SimpleSimonsSolutions/NodeMCUWebServer
lua webserver
Last synced: 10 months ago
JSON representation
NodeMCU ESP8266 WebServer
- Host: GitHub
- URL: https://github.com/SimpleSimonsSolutions/NodeMCUWebServer
- Owner: SimpleSimonsSolutions
- Created: 2016-02-27T06:50:22.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-08T09:57:28.000Z (almost 10 years ago)
- Last Synced: 2024-11-06T15:46:54.292Z (about 1 year ago)
- Topics: lua, webserver
- Language: Lua
- Size: 21.5 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NodeMCUWebServer
NodeMCU / ESP8266 WebServer
Alpha release 0.5.0
This WebServer may run on NodeMCU builds other than WeMos-D1R2 / ESP8266.
I am interested in finding out, and have ordered a couple of other boards.
It should support serving up basic non-HTML such as jpg, wav, etc. But it's not tested.
(look in WebServer.lua for allowable types).
Dynamic content is supported via pre- and post- file include variables.
Said content is limited by heap space to maybe 10K or so.
Dive into gpio.lua for how to do it - there's subtleties to consider!
A usage document is just dying to be written. ;)
I use Esplorer as my IDE. Boot ID:
NodeMCU 0.9.6 build 20150704 powered by Lua 5.1.4
Boot heap: 32736. Webserver active idle heap: 18104.
WebServer.lua -- Main module. Needs to be run as a compiled (lc) file for memory reasons.
fileutils.lua -- "require"d module - compile it
urlutils.lua -- "require"d module - compile it
Some basic webcontent:
favicon.ico - My logo. Initially used for basic testing, but now my "brand". :)
index.htm - default web page - if no filename in URL, this is used
gpio.lua / gpio.htm - just a basic form-based GET/POST combination for testing / demonstration
WiFi.lua - does not yet exist. Will be a "port" of WiFiInfo, but currently just 404 testing. ;)
There are a few little utility programs that I've not been
able to find anywhere else (maybe I've reinvented the wheel):
printfile.lua - parameter is the filename (duh)
WiFiInfo.lua - prints all current wifi status it can find.