aboutsummaryrefslogtreecommitdiffstats
path: root/application.lua
diff options
context:
space:
mode:
authorClemens Fries <git-iot@xenoworld.de>2018-09-22 16:19:30 +0200
committerClemens Fries <git-iot@xenoworld.de>2018-09-22 16:19:30 +0200
commitaa72712b30e43bd36968b7a52749f80963f66342 (patch)
treeaf959bfeaf26106f3a1bd02d8a3f42740dbb7408 /application.lua
parentc7c63ab77969e3b532079f0977495c7fc31334ba (diff)
Add a simple web site that displays the sensor data
This also adds an overly broad CORS policy, complying with best industry practices for IoT.
Diffstat (limited to 'application.lua')
-rw-r--r--application.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/application.lua b/application.lua
index ad90814..2474822 100644
--- a/application.lua
+++ b/application.lua
@@ -15,6 +15,7 @@ srv:listen(80,function(conn)
-- local Tsgn = (T < 0 and -1 or 1); T = Tsgn*T
conn:send(string.format([[HTTP/1.1 200 OK
Content-Type: application/json
+Access-Control-Allow-Origin: *
Connection: close
{"temperature": %s, "pressure": %s, "humidity": %s,