|
|
@ -1,4 +1,4 @@
|
|
|
|
import { serve } from "https://deno.land/std@0.160.0/http/server.ts";
|
|
|
|
import { serve } from "https://deno.land/std@0.162.0/http/server.ts";
|
|
|
|
import config from "./config.ts";
|
|
|
|
import config from "./config.ts";
|
|
|
|
|
|
|
|
|
|
|
|
interface SockClient {
|
|
|
|
interface SockClient {
|
|
|
@ -59,8 +59,8 @@ function reqHandler(req: Request) {
|
|
|
|
return response;
|
|
|
|
return response;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default function initialize(port: number) {
|
|
|
|
export default function initialize(hostname: string, port: number) {
|
|
|
|
serve(reqHandler, { port: port });
|
|
|
|
serve(reqHandler, { hostname: hostname, port: port });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function sendSocketMessage(
|
|
|
|
export function sendSocketMessage(
|
|
|
|