Skip to content

Instantly share code, notes, and snippets.

@leafo
Created July 10, 2014 05:17
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leafo/92ef8250f1f61e3f45ec to your computer and use it in GitHub Desktop.
Save leafo/92ef8250f1f61e3f45ec to your computer and use it in GitHub Desktop.
Spreading a Lua Lapis application across multiple files
local app = lapis.Application()
package.loaded.app = app
require "app_1"
require "app_2"
return app
local app = require "app"
app:get("/hello", function(self) end)
app:post("/world", function(self) end)
local app = require "app"
app:get("/user/login", function(self) end)
app:post("/user/logout", function(self) end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment