diff --git a/code/config.lua b/code/config.lua index fe53fef..e3d62b3 100644 --- a/code/config.lua +++ b/code/config.lua @@ -14,5 +14,8 @@ config("production", { greeting = "nothing here yet", postgres = { password = os.getenv('POSTGRES_PASSWORD') + }, + logging = { + queries = false } }) diff --git a/code/handlers/artisthandler.lua b/code/handlers/artisthandler.lua index 5eb617e..414d369 100644 --- a/code/handlers/artisthandler.lua +++ b/code/handlers/artisthandler.lua @@ -6,7 +6,7 @@ local preload = require("lapis.db.model").preload local models = autoload("models") -function Artisthandler(self) +local function Artisthandler(self) local artist_id = self.params.artist local artist = models.Artists:find({ id = artist_id }) diff --git a/code/handlers/splhandler.lua b/code/handlers/splhandler.lua index c2ef935..32fc744 100644 --- a/code/handlers/splhandler.lua +++ b/code/handlers/splhandler.lua @@ -4,7 +4,7 @@ local to_json = require("lapis.util").to_json local autoload = require("lapis.util").autoload local models = autoload("models") -function Splhandler(self) +local function Splhandler(self) -- print( to_json(self.params)) -- TODO: add auth-token diff --git a/code/handlers/stationhandler.lua b/code/handlers/stationhandler.lua index c010e79..81da44d 100644 --- a/code/handlers/stationhandler.lua +++ b/code/handlers/stationhandler.lua @@ -6,7 +6,7 @@ local preload = require("lapis.db.model").preload local models = autoload("models") -function Stationhandler(self) +local function Stationhandler(self) local station_id = self.params.station local json = self.params.json or nil diff --git a/code/handlers/trackhandler.lua b/code/handlers/trackhandler.lua index 6a59c4f..4cfc1e5 100644 --- a/code/handlers/trackhandler.lua +++ b/code/handlers/trackhandler.lua @@ -6,7 +6,7 @@ local preload = require("lapis.db.model").preload local models = autoload("models") -function Trackhandler(self) +local function Trackhandler(self) local track_id = self.params.track local track = models.Tracks:find({ id = track_id }) diff --git a/code/nginx.conf b/code/nginx.conf index 3208438..f6733c2 100644 --- a/code/nginx.conf +++ b/code/nginx.conf @@ -16,6 +16,11 @@ http { include mime.types; resolver 127.0.0.11; + init_by_lua_block { + require("socket") + require("lpeg") + } + server { listen ${{PORT}}; lua_code_cache ${{CODE_CACHE}};