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 postgres -> backend "pgmoon" host "127.0.0.1" user "lapis" password "lapis" database "panel" config "docker", -> port 5000 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"