style: Fix broken grammar
This commit is contained in:
parent
785892e322
commit
20a908e8a2
@ -10,9 +10,9 @@ const server = createServer(app);
|
|||||||
const io = new Server(server);
|
const io = new Server(server);
|
||||||
|
|
||||||
io.on('connection', async (socket) => {
|
io.on('connection', async (socket) => {
|
||||||
// Runs on client connect
|
// Runs on client connection
|
||||||
console.log(`[ws:kit] client connected (${socket.id})`);
|
console.log(`[ws:kit] client connected (${socket.id})`);
|
||||||
// Runs on message receive
|
// Runs on message received
|
||||||
socket.on('message', async (msg) => {
|
socket.on('message', async (msg) => {
|
||||||
// If message not empty
|
// If message not empty
|
||||||
if (msg.content !== '') {
|
if (msg.content !== '') {
|
||||||
@ -33,7 +33,7 @@ app.use((req, res, next) => {
|
|||||||
if (req.path.startsWith('/socket.io/')) {
|
if (req.path.startsWith('/socket.io/')) {
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
handler(req, res);
|
handler(req, res, next);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -11,9 +11,9 @@ export function startupSocketIOServer(httpServer: HttpServer | null) {
|
|||||||
io = new SocketIOServer(httpServer);
|
io = new SocketIOServer(httpServer);
|
||||||
|
|
||||||
io.on('connection', async (socket) => {
|
io.on('connection', async (socket) => {
|
||||||
// Runs on client connect
|
// Runs on client connection
|
||||||
console.log(`[ws:kit] client connected (${socket.id})`);
|
console.log(`[ws:kit] client connected (${socket.id})`);
|
||||||
// Runs on message receive
|
// Runs on message received
|
||||||
socket.on('message', async (msg) => {
|
socket.on('message', async (msg) => {
|
||||||
// If message not empty
|
// If message not empty
|
||||||
if (msg.content !== '') {
|
if (msg.content !== '') {
|
||||||
|
Loading…
Reference in New Issue
Block a user