0.0.1 • Published 7 months ago
@8n/srv v0.0.1
@8n/srv
返回值
如果函数,会被传入 res ,可以 res.writeStatus(status).end(r)
如果不是 undefined ,会被 msgpack pack
post,put
如果 content_type.endsWith '/json'
body 如果 length > 1
会被 json parse
如果是一个数组 会 f.apply opt, body
否则会 f.call opt, body
否则如果 body 有的长度 f.call opt, body
#!/usr/bin/env coffee
output :
/test
→ http://127.0.0.1:3223
uWS.App {}
post test
post test
post test
post test
0.0.1
7 months ago