update config

This commit is contained in:
Sam Dodrill 2015-01-09 19:14:27 -08:00
parent 830fd195dc
commit f0b56405fe
1 changed files with 5 additions and 13 deletions

View File

@ -1,13 +1,5 @@
config = require "lapis.config"
ffi = actualrequire("ffi")
ffi.cdef [[
char *getenv(const char *name)
]]
getenv = (name) ->
ffi.string ffi.C.getenv name
config "development", ->
port 8080
@ -23,8 +15,8 @@ config "docker", ->
postgres ->
backend "pgmoon"
port getenv "POSTGRESQL_PORT_5432_TCP_PORT"
host getenv "POSTGRESQL_PORT_5432_TCP_ADDR"
user getenv "DB_USER"
password getenv "DB_PASS"
database getenv "DB_NAME"
port tostring os.getenv "POSTGRESQL_PORT_5432_TCP_PORT"
host tostring os.getenv "POSTGRESQL_PORT_5432_TCP_ADDR"
user tostring os.getenv "DB_USER"
password tostring os.getenv "DB_PASS"
database tostring os.getenv "DB_NAME"