refactor migration

This commit is contained in:
Josh Harvey 2017-07-19 16:14:45 +02:00
parent 272405b4b1
commit 916a3629a8
7 changed files with 84 additions and 58 deletions

View file

@ -5,6 +5,11 @@ const _ = require('lodash/fp')
const argv = require('minimist')(process.argv.slice(2))
function load () {
if (process.env.LAMASSU_CONFIG) {
const configPath = process.env.LAMASSU_CONFIG
return JSON.parse(fs.readFileSync(configPath))
}
if (argv.f) {
const configPath = argv.f
return JSON.parse(fs.readFileSync(configPath))