balena-supervisor/src/supervisor.coffee

14 lines
401 B
CoffeeScript
Raw Normal View History

process.on 'uncaughtException', (e) ->
console.error('Got unhandled exception', e, e?.stack)
supervisor = require './supervisor-update'
2014-09-15 15:04:38 +01:00
# Make sure the supervisor-update has initialised before we continue, as it will handle restarting to add mounts if
# necessary.
supervisor.initialised.then ->
knex = require './db'
# Wait for the DB schema to be created
knex.init.then ->
require('./app')