2020-04-06 22:47:58 +00:00
|
|
|
import log from './api/log.mjs'
|
|
|
|
import setup from './api/setup.mjs'
|
2016-04-10 08:37:05 +00:00
|
|
|
|
|
|
|
// Run the database script automatically.
|
|
|
|
log.info('Running database integrity scan.')
|
|
|
|
|
|
|
|
setup().then(() => {
|
2020-04-06 22:47:58 +00:00
|
|
|
import('./api/server.mjs')
|
2016-04-10 08:37:05 +00:00
|
|
|
}).catch((error) => {
|
|
|
|
log.error(error, 'Error while preparing database')
|
|
|
|
process.exit(1)
|
|
|
|
})
|