app.lua 219 B

123456789101112
  1. local perihelion = require('perihelion')
  2. local app = perihelion.new()
  3. local function index(web)
  4. web.headers = { 'Content-type', 'text/plain' }
  5. return web:ok('Hello world!')
  6. end
  7. app:get('/')({ index })
  8. return app