[call-me] - fix typo
This commit is contained in:
+13
-12
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user