- // ----------- Make the server listening -----------
- server.listen(port, function () {
- // Activate the pool requests
- Request.activate()
+ // Run the migration scripts if needed
+ migrator.migrate(function (err) {
+ if (err) throw err
+
+ // ----------- Make the server listening -----------
+ server.listen(port, function () {
+ // Activate the pool requests
+ Request.activate()
+
+ logger.info('Server listening on port %d', port)
+ logger.info('Webserver: %s', constants.CONFIG.WEBSERVER.URL)