1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-18 19:19:36 +02:00

Read/write css file from app settings. Changed order of operations at app startup. Added nano to Dockerfile

This commit is contained in:
unknown 2021-06-22 13:07:32 +02:00
parent 4c3255107c
commit 5ae4d6e7c4
15 changed files with 161 additions and 35 deletions

View file

@ -10,20 +10,20 @@ const initConfig = require('./utils/initConfig');
const PORT = process.env.PORT || 5005;
connectDB()
.then(() => {
associateModels();
initConfig();
});
(async () => {
await connectDB();
await associateModels();
await initConfig();
// Create server for Express API and WebSockets
const server = http.createServer();
server.on('request', api);
// Create server for Express API and WebSockets
const server = http.createServer();
server.on('request', api);
// Register weatherSocket
const weatherSocket = new Socket(server);
Sockets.registerSocket('weather', weatherSocket);
// Register weatherSocket
const weatherSocket = new Socket(server);
Sockets.registerSocket('weather', weatherSocket);
server.listen(PORT, () => {
console.log(`Server is running on port ${PORT} in ${process.env.NODE_ENV} mode`);
})
server.listen(PORT, () => {
console.log(`Server is running on port ${PORT} in ${process.env.NODE_ENV} mode`);
})
})();