forked from tv2/sisyfos-audio-controller
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d8aaf2
commit 74d176d
Showing
1 changed file
with
28 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
import { logger } from './utils/logger' | ||
|
||
const express = require('express') | ||
const path = require('path') | ||
const app = express(); | ||
const server = require('http').Server(app); | ||
const socketServer = require('socket.io')(server); | ||
|
||
app.use( '/' , express.static(path.join(__dirname ,'..'))) | ||
server.listen(1176); | ||
|
||
server.on('connection', () => { | ||
app.get('/', (req: any, res: any) => { | ||
res.sendFile(path.resolve('dist/index.html')) | ||
}) | ||
}) | ||
socketServer.on('connection', ((socket: any) => { | ||
logger.info('Client connected :' + String(socket.client.id), {}) | ||
global.mainThreadHandler.socketServerHandlers(socket) | ||
}) | ||
) | ||
|
||
export const expressInit = () => { | ||
logger.info('Initialising WebServer') | ||
} | ||
|
||
export { socketServer } | ||
import { logger } from './utils/logger' | ||
|
||
const express = require('express') | ||
const path = require('path') | ||
const app = express(); | ||
const server = require('http').Server(app); | ||
const socketServer = require('socket.io')(server); | ||
|
||
app.use( '/' , express.static(path.join(__dirname ,'..'))) | ||
server.listen(1176); | ||
|
||
server.on('connection', () => { | ||
app.get('/', (req: any, res: any) => { | ||
res.sendFile(path.resolve('dist/index.html')) | ||
}) | ||
}) | ||
|
||
socketServer.on('connection', ((socket: any) => { | ||
logger.info('Client connected :' + String(socket.client.id), {}) | ||
global.mainThreadHandler.socketServerHandlers(socket) | ||
}) | ||
) | ||
|
||
export const expressInit = () => { | ||
logger.info('Initialising WebServer') | ||
} | ||
|
||
export { socketServer } |