2022-03-06 19:46:59 -05:00
|
|
|
import { createServer } from 'http';
|
|
|
|
import { app } from './app';
|
2022-03-21 20:20:41 -04:00
|
|
|
import config from './lib/config';
|
|
|
|
import { sequelize } from './lib/sequelize';
|
2022-03-06 19:46:59 -05:00
|
|
|
|
|
|
|
(async () => {
|
2022-03-21 18:55:21 -04:00
|
|
|
await sequelize.sync();
|
2022-03-06 19:46:59 -05:00
|
|
|
createServer(app)
|
|
|
|
.listen(
|
|
|
|
config.port,
|
|
|
|
() => console.info(`Server running on port ${config.port}`)
|
|
|
|
);
|
|
|
|
})();
|