added 404 page

This commit is contained in:
2024-05-21 15:13:24 -07:00
parent 001114251e
commit a40bd2ae72
2 changed files with 56 additions and 1 deletions

View File

@ -32,7 +32,8 @@
(. _G.files uri) (. _G.files uri)
(utils.file-exists? uri) (with-open [file (io.open uri :r)]
(file:read :*a))
"404 - Not Found"))
(with-open [file (io.open :404.html :r)]
(file:read :*a))))
(client:send "HTTP/1.1 200 OK\r\n\r\n")
(client:send content)