blob: 2562fb1e2388588729acd2d295a2af70ef1e80c2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
local index = require("index")
math.randomseed(os.time())
local function route(path)
if path == '/' then
return 200, index()
end
return 404, <html>
<head>
<title>Error 404</title>
</head>
<body>
<h1>Error 404</h1>
<p>Page not found.</p>
</body>
</html>
end
return {
name = "hello-world",
route = route
}
|