ready to rock

This commit is contained in:
Luke Berndt
2023-04-11 09:38:32 -04:00
parent 1148324b87
commit e44c2b6e41
2 changed files with 5 additions and 12 deletions

View File

@@ -23,13 +23,13 @@ var app = express();
const server = require('http').createServer(app); const server = require('http').createServer(app);
/*
const io = require('socket.io')(server, { const io = require('socket.io')(server, {
cors: { cors: {
origin: "*", origin: "*",
methods: ["GET", "POST"], methods: ["GET", "POST"],
} }
});*/ });
@@ -41,7 +41,7 @@ configureExpress(app)
// ------------------------------------------- // -------------------------------------------
var host = process.env['MONGO_NODE_DRIVER_HOST'] != null ? process.env['MONGO_NODE_DRIVER_HOST'] : 'localhost'; var host = process.env['MONGO_NODE_DRIVER_HOST'] != null ? process.env['MONGO_NODE_DRIVER_HOST'] : 'mongo';
var port = process.env['MONGO_NODE_DRIVER_PORT'] != null ? process.env['MONGO_NODE_DRIVER_PORT'] : 27017; var port = process.env['MONGO_NODE_DRIVER_PORT'] != null ? process.env['MONGO_NODE_DRIVER_PORT'] : 27017;
var mongoUrl = 'mongodb://' + host + ':' + port + '/scanner'; var mongoUrl = 'mongodb://' + host + ':' + port + '/scanner';
@@ -237,7 +237,7 @@ function notify_clients(call) {
/*
io.sockets.on('connection', function (client) { io.sockets.on('connection', function (client) {
clients[client.id] = { socket: client, active: false }; clients[client.id] = { socket: client, active: false };
clients[client.id].timestamp = new Date(); clients[client.id].timestamp = new Date();
@@ -266,7 +266,7 @@ io.sockets.on('connection', function (client) {
return; return;
} }
if (group) { if (group) {
//clients[client.id].talkgroupNums = group.talkgroups; clients[client.id].talkgroupNums = group.talkgroups;
} else { } else {
console.error("Error - Socket: Invalid group " + data.filterCode + " Shortname: " + data.shortName + " ClientID: " + client.id); console.error("Error - Socket: Invalid group " + data.filterCode + " Shortname: " + data.shortName + " ClientID: " + client.id);
delete clients[client.id]; delete clients[client.id];
@@ -293,8 +293,6 @@ io.sockets.on('connection', function (client) {
}); });
}); });
*/
stats.init_stats(); stats.init_stats();
server.listen(app.get("port"), (err) => { server.listen(app.get("port"), (err) => {

View File

@@ -56,16 +56,11 @@ services:
- REACT_APP_ADMIN_SERVER - REACT_APP_ADMIN_SERVER
- REACT_APP_FRONTEND_SERVER - REACT_APP_FRONTEND_SERVER
- REACT_APP_SOCKET_SERVER - REACT_APP_SOCKET_SERVER
- REACT_APP_COOKIE_DOMAIN
- REACT_APP_ACCOUNT_SERVER - REACT_APP_ACCOUNT_SERVER
- S3_ENDPOINT - S3_ENDPOINT
- S3_BUCKET - S3_BUCKET
- S3_PROFILE - S3_PROFILE
- S3_REGION - S3_REGION
- TWITTER_CONSUMER_KEY
- TWITTER_CONSUMER_SECRET
- TWITTER_ACCESS_TOKEN_KEY
- TWITTER_ACCESS_TOKEN_SECRET
volumes: volumes:
- "~/.aws:/home/app/.aws" - "~/.aws:/home/app/.aws"
depends_on: depends_on: