etisab пре 10 година
родитељ
комит
071c4c5336
2 измењених фајлова са 5 додато и 1 уклоњено
  1. 1 0
      rebuild/read.lua
  2. 4 1
      rebuild/server.lua

+ 1 - 0
rebuild/read.lua

@@ -46,6 +46,7 @@ function current_settings()
 end
 
 function index()
+  --TODO determine tradeoff of hardcoding index.html
   file.open('index.html')
   local index = file.read()
   file.close()

+ 4 - 1
rebuild/server.lua

@@ -14,8 +14,11 @@ local function connect(conn, data)
       query_data = get_http_req(req_data)
       debug_message(query_data['METHOD'] .. ' ' .. ' ' .. query_data['User-Agent'])
 
+      --TODO discriminate endpoints (/, /yo.css, /status, /favicon.ico)
+      --TODO discriminate request types (POST --> update)
+        --TODO parse payload function rewrite
+        
       send_index(cn)
-      -- Close the connection for the request
       cn:close()
     end
   )