mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
16 lines
455 B
CoffeeScript
Executable file
16 lines
455 B
CoffeeScript
Executable file
fs = require "fs"
|
|
path = require "path"
|
|
env = (process.env.NODE_ENV or "development").toLowerCase()
|
|
|
|
possibleConfigFiles = [
|
|
process.cwd() + "/config/settings.#{env}.coffee"
|
|
path.normalize(__dirname + "/../../config/settings.#{env}.coffee")
|
|
]
|
|
|
|
for file in possibleConfigFiles
|
|
if fs.existsSync(file)
|
|
module.exports = require(file)
|
|
return
|
|
|
|
console.log "No config file could be found at: ", possibleConfigFiles
|
|
throw new Error("No config file found")
|