@@ 17,6 17,9 @@ Routes are in the routes.json file
- text, sends res as text
- file, sends file content
- directory, sends files contents in directory as json
+
+ for example:
+
```json
[
{
@@ 29,12 32,14 @@ Routes are in the routes.json file
}
]
```
+
- route
- - get, returns the content of the routing array as json
- - refresh, refresh the routes array
+ - get, returns the content of the routing array as json
+ - refresh, refresh the routes array
#### optional
+- mime = sets the "Content-Type" header
- status = force http status code
## Example
@@ 73,6 78,13 @@ Routes are in the routes.json file
"type": "route refresh"
},
+ // Optionally specify the mime type of the file
+ {
+ "req": "/index_mime",
+ "type": "file",
+ "mime": "text/lua",
+ "res": "src/index.lua"
+ },
// Optionally give http status code
{
"req": "/500",
@@ 82,4 94,4 @@ Routes are in the routes.json file
}
]
}
-```>
\ No newline at end of file
+```