Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Jan 9, 2025
1 parent ee4822b commit bd5282f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/engine.io/lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ interface ConnectionError {
}

interface ServerReservedEvents {
connection: (socket: Socket, request: Request, connInfo: Deno.ServeHandlerInfo) => void;
connection: (
socket: Socket,
request: Request,
connInfo: Deno.ServeHandlerInfo,
) => void;
connection_error: (err: ConnectionError) => void;
}

Expand Down Expand Up @@ -125,7 +129,10 @@ export class Server extends EventEmitter<
* @param additionalHandler - another handler which will receive the request if the path does not match
*/
public handler(additionalHandler?: Deno.ServeHandler) {
return (req: Request, connInfo: Deno.ServeHandlerInfo): Response | Promise<Response> => {
return (
req: Request,
connInfo: Deno.ServeHandlerInfo,
): Response | Promise<Response> => {
const url = new URL(req.url);
if (url.pathname === this.opts.path) {
return this.handleRequest(req, connInfo, url);
Expand Down

0 comments on commit bd5282f

Please sign in to comment.