[call-me] - fix typo

This commit is contained in:
Miroslav Pejic
2026-02-07 22:11:42 +01:00
parent dbb8e105e4
commit 4eb1525fb6
+13 -12
View File
@@ -167,18 +167,7 @@ async function ngrokStart() {
}
}
// Start the server and listen on the specified port
server.listen(port, () => {
if (ngrokEnabled && ngrokAuthToken) {
ngrokStart();
} else {
log.info('Server', getServerConfig());
}
});
// Handle WebSocket connections
io.on('connection', handleConnection);
// Configure Express middleware BEFORE starting the server
app.use(cors(corsOptions)); // Handle cors options
app.use(helmet.noSniff()); // Enable content type sniffing prevention
app.use(express.static(PUBLIC_DIR)); // Serve static files from the 'public' directory
@@ -361,6 +350,18 @@ const isAuthorized = (req) => {
return authorization === config.apiKeySecret;
};
// Start the server and listen on the specified port
server.listen(port, () => {
if (ngrokEnabled && ngrokAuthToken) {
ngrokStart();
} else {
log.info('Server', getServerConfig());
}
});
// Handle WebSocket connections
io.on('connection', handleConnection);
// Function to handle individual WebSocket connections
function handleConnection(socket) {
log.debug('User connected:', socket.id);