aboutsummaryrefslogtreecommitdiff
path: root/src/start_server.cr
blob: 9df5d1fd89d7d32e6ce68c98d487df52cacdec85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require "./app"

Habitat.raise_if_missing_settings!

if LuckyEnv.development?
  Avram::Migrator::Runner.new.ensure_migrated!
  Avram::SchemaEnforcer.ensure_correct_column_mappings!
end

app_server = AppServer.new

Signal::INT.trap do
  app_server.close
end

app_server.listen