TDengine/tests/examples/lua/OpenResty/conf/nginx.conf
robot e8260ed869 Implement connector for OpenResty based on lua51.
Connector is implemented by lua51 but luajit and ffi are not included. Connection pool is not implemented yet. It is a raw demonstration at present and not verified on production environment.
2020-12-08 14:11:22 +08:00

21 lines
469 B
Nginx Configuration File

worker_processes 1;
user root;
error_log logs/error.log;
events {
worker_connections 1024;
}
http {
lua_package_path '$prefix/lua/?.lua;$prefix/rest/?.lua;/blah/?.lua;;';
lua_package_cpath "$prefix/so/?.so;;";
lua_code_cache off;
server {
listen 7000;
server_name restapi;
charset utf-8;
lua_need_request_body on;
location ~ ^/api/([-_a-zA-Z0-9/]+) {
content_by_lua_file rest/$1.lua;
}
}
}