You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on a WebSocket server using next-ws in a Next.js environment. I need to include SSL options (Want to include ssl certificate & key) when initializing the WebSocket server , but I'm unsure how to do this properly.
import { NextRequest, NextResponse } from 'next/server';
import WebSocket from 'ws';
type DrawLine = {
prevPoint: Point | null;
currentPoint: Point;
color: string;
x: number;
y: number;
};
const clients: Set<WebSocket> = new Set();
function SOCKET(
client: WebSocket,
request: import('http').IncomingMessage,
server: WebSocketServer,
) {
// WebSocket server logic
}
function GET(req: NextRequest, res: NextResponse) {
// Handle GET request
}
function POST(req: NextRequest, res: NextResponse) {
// Handle POST request
}
export { SOCKET, GET, POST };
I need guidance on how to properly include SSL because the connection to WS don't get established when in production environment
The text was updated successfully, but these errors were encountered:
I'm currently working on a WebSocket server using next-ws in a Next.js environment. I need to include SSL options (Want to include ssl certificate & key) when initializing the WebSocket server , but I'm unsure how to do this properly.
I need guidance on how to properly include SSL because the connection to WS don't get established when in production environment
The text was updated successfully, but these errors were encountered: