etisab před 10 roky
rodič
revize
071c4c5336
2 změnil soubory, kde provedl 5 přidání a 1 odebrání
  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
   )