added Callback and custon notification Toast, client notification event handler
This commit is contained in:
@@ -11,6 +11,18 @@ import cors from "cors";
|
||||
import { handleSendMessage } from "socket-events/send-message";
|
||||
import { handleConnectPilot } from "socket-events/connect-pilot";
|
||||
import { handleConnectDesktop } from "socket-events/connect-desktop";
|
||||
import cookieParser from "cookie-parser";
|
||||
import { authMiddleware } from "modules/expressMiddleware";
|
||||
import { prisma, User } from "@repo/db";
|
||||
import { Request, Response, NextFunction } from "express";
|
||||
|
||||
declare global {
|
||||
namespace Express {
|
||||
interface Request {
|
||||
user?: User | null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const app = express();
|
||||
const server = createServer(app);
|
||||
@@ -31,6 +43,8 @@ io.on("connection", (socket) => {
|
||||
|
||||
app.use(cors());
|
||||
app.use(express.json());
|
||||
app.use(cookieParser());
|
||||
app.use(authMiddleware as any);
|
||||
app.use(router);
|
||||
|
||||
server.listen(process.env.PORT, () => {
|
||||
|
||||
Reference in New Issue
Block a user