site_config.lua 291 B

123456789
  1. local config = os.getenv('GLUON_SITE_CONFIG')
  2. local function loader()
  3. coroutine.yield('return ')
  4. coroutine.yield(io.open(config):read('*a'))
  5. end
  6. -- setfenv doesn't work with Lua 5.2 anymore, but we're using 5.1
  7. return setfenv(assert(load(coroutine.wrap(loader), 'site.conf')), {})()