Created
July 10, 2014 05:17
-
-
Save leafo/92ef8250f1f61e3f45ec to your computer and use it in GitHub Desktop.
Spreading a Lua Lapis application across multiple files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local app = lapis.Application() | |
package.loaded.app = app | |
require "app_1" | |
require "app_2" | |
return app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local app = require "app" | |
app:get("/hello", function(self) end) | |
app:post("/world", function(self) end) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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