-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.js
32 lines (23 loc) · 857 Bytes
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
process.env.NODE_ENV = 'prod';
//Define port
const logger = require('./logger.js');
const config = require('./config');
const http = require('./index.js')(logger);
const socket = require('socket.io');
const drawingWebsocket = require('./websocket');
var deploymentTaks=require('./deploymentTasks');
//Run the server using express
var server = http.listen(config.port, () => {
//Generate 4 qr codes at the deployment of the app
deploymentTaks.generateQRCodes();
deploymentTaks.generateRegisterForQrCodes();
console.log(`Server listening on port ${config.port}...`);
});
var io = require('./websocket').listen(http);
// var io = socket(server)
// io.on('connection', function(socket){
// console.log('made socket connection')
// socket.on('display', function(data){
// io.sockets.emit('display', data)
// })
// })