mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-27 03:31:46 +00:00
Add dev.default.js file
Added default dev file. Allows users to customize with existing dev.js, but environment can work out of the box most of the time.
This commit is contained in:
parent
ef56714573
commit
aa336cfeb4
2 changed files with 14 additions and 1 deletions
4
index.js
4
index.js
|
|
@ -1,9 +1,11 @@
|
|||
const server = require('./server/Server')
|
||||
const fs = require('fs')
|
||||
global.appRoot = __dirname
|
||||
|
||||
const isDev = process.env.NODE_ENV !== 'production'
|
||||
if (isDev) {
|
||||
const devEnv = require('./dev').config
|
||||
const devFile = fs.existsSync('./dev.js') ? './dev' : './dev.default'
|
||||
const devEnv = require(devFile).config
|
||||
process.env.NODE_ENV = 'development'
|
||||
process.env.PORT = devEnv.Port
|
||||
process.env.CONFIG_PATH = devEnv.ConfigPath
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue