Lua > OpenResty HelloWorld

Lua > OpenResty HelloWorld

参考 https://www.bilibili.com/video/BV12i4y1L7As/

bash 复制代码
mkdir hello
cd hello
mkdir conf logs
vim conf/nginx.conf
conf 复制代码
worker_processes 1;

events {
    worker_connections 1024;
}

http {
    server {
        listen 8888 reuseport;
        
        location / {
            default_type text/plain;
            content_by_lua_block { ngx.say("Hello World") }
        }
    }
}
bash 复制代码
tree

.

├── conf

│ └── nginx.conf

└── logs

bash 复制代码
nginx -p ./ -t
nginx -p ./
ps aux | grep nginx
curl 'http://127.0.0.1:8888'

Hello World

相关推荐
白山编程大哥13 小时前
Lua 中使用 C 语言的用户自定义类型——userdata
c语言·junit·lua
大侠归来3 天前
C++ 与 Lua 的协程交互:从原理到实战
c++·lua·交互
疯狂成瘾者3 天前
海康 Artemis 接口对接
开发语言·lua
一线灵4 天前
跨平台游戏引擎 Axmol-2.11.5 发布
游戏引擎·lua
liulilittle13 天前
麻将结算全链路语义(SETTLE_SEMANTICS)
ai·自动化·llm·mock·lua·测试
liulilittle13 天前
麻将服务器崩溃补偿与异常处理语义(CRASH_SEMANTICS)
ai·自动化·llm·mock·lua·测试·tools
liulilittle13 天前
麻将 UI 层可观察行为(UI_BEHAVIOR)
ai·自动化·llm·mock·lua·测试·tools
liulilittle13 天前
C++ 引擎接口到 mock 的映射(INTERFACE_MAP)
ai·自动化·llm·mock·lua·测试·tools
bst@微胖子16 天前
Linux环境做LVM快照
lua
橘色的喵18 天前
XCOM:一个 4 MB 的串口调试工具
串口·lua·串口工具·xcom