WIP: routing
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
worker_processes 1;
|
||||
error_log logs/error.log;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
init_by_lua_block {
|
||||
require "routes"
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
|
||||
@@ -12,9 +18,15 @@ http {
|
||||
|
||||
location / {
|
||||
default_type text/html;
|
||||
# content_by_lua_block {
|
||||
# ngx.say("<p>hello, world</p>")
|
||||
# }
|
||||
}
|
||||
|
||||
location /foo {
|
||||
default_type text/html;
|
||||
|
||||
rewrite_by_lua_block {
|
||||
routes = require "routes"
|
||||
routes:dispatch()
|
||||
}
|
||||
}
|
||||
|
||||
location /css {
|
||||
|
||||
Reference in New Issue
Block a user