https://github.com/moteus/lua-lluv-pegasus
Simple server based on pegasus.lua library
https://github.com/moteus/lua-lluv-pegasus
http-server libuv lua
Last synced: 12 months ago
JSON representation
Simple server based on pegasus.lua library
- Host: GitHub
- URL: https://github.com/moteus/lua-lluv-pegasus
- Owner: moteus
- License: mit
- Created: 2017-10-13T11:23:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-01-08T07:17:07.000Z (about 5 years ago)
- Last Synced: 2025-03-28T21:37:53.780Z (about 1 year ago)
- Topics: http-server, libuv, lua
- Language: Lua
- Homepage:
- Size: 13.7 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lua-lluv-pegasus
Simple server based on [pegasus.lua](http://evandrolg.github.io/pegasus.lua) library
```Lua
local uv = require "lluv"
local Pegasus = require "lluv.pegasus"
local server = Pegasus.new{host = '127.0.0.1', port = 9090}
server:start(function(request, response)
response:statusCode(200)
response:addHeader('Content-Type', 'text/plain')
response:write('Hello from Pegasus')
end)
uv.run()
```