appwilldev / moochine-demo Goto Github PK
View Code? Open in Web Editor NEWOpenResty(ngx_lua, http://openresty.org )+Moochine 完整实例
Home Page: https://github.com/appwilldev/moochine
OpenResty(ngx_lua, http://openresty.org )+Moochine 完整实例
Home Page: https://github.com/appwilldev/moochine
同一个机器配置多个项目,会发现这个环境变量 会变成其中一个项目中的一个,而不是分开的各种项目配置的值
luasrc\mch\router.lua中的map有4个参数,但是demo中调用的时候只传了两个参数,一个uri,一个func_name
想请教下是什么情况
function map(route_table, route_order, uri, func_name) local ret, err = pcall(_map, route_table, route_order, uri, func_name) if not ret then local error_info = "MOOCHINE URL Mapping Error:[" .. uri .. "=>" .. func_name .. "] " .. err logger:e(error_info) ngx.log(ngx.ERR, error_info) end end
`local router = require('mch.router')
router.setup()
map('^/mchconsole', 'mch.console.start')
map('^/hello%?name=(.*)', 'test.hello')
map('^/longtext', 'test.longtext')
map('^/ltp', 'test.ltp')
`
how to clone this demo on the host,share the directory and run the moochine in the docker
2014/07/20 22:26:27 [error] 1932#0: *4 lua entry thread aborted: runtime error: /opt/moochine/luasrc/mch_content.lua:130: attempt to index a nil value
stack traceback:
coroutine 0:
/opt/moochine/luasrc/mch_content.lua: in function 'content'
/opt/moochine/luasrc/mch_content.lua:170: in function </opt/moochine/luasrc/mch_content.lua:2>, client: 127.0.0.1, server: , request: "GET /hello?name=abcde HTTP/1.1", host: "localhost:9800"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.