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:
parent
4c3255107c
commit
5ae4d6e7c4
15 changed files with 161 additions and 35 deletions
28
server.js
28
server.js
|
@ -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`);
|
||||
})
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue