2016-04-10 08:37:05 +00:00
|
|
|
'use strict'
|
|
|
|
require('babel-register')
|
|
|
|
|
|
|
|
let log = require('./log').default
|
|
|
|
|
|
|
|
// Run the database script automatically.
|
|
|
|
log.info('Running database integrity scan.')
|
|
|
|
let setup = require('./script/setup')
|
|
|
|
|
|
|
|
setup().then(() => {
|
2017-12-03 11:34:43 +00:00
|
|
|
require('./api/server')
|
2016-04-10 08:37:05 +00:00
|
|
|
}).catch((error) => {
|
|
|
|
log.error(error, 'Error while preparing database')
|
|
|
|
process.exit(1)
|
|
|
|
})
|