Compare commits

...

3 commits

3 changed files with 6 additions and 3 deletions

View file

@ -1,5 +1,5 @@
{
"imports": {
"ren/": "https://git.pleshevski.ru/pleshevskiy/ren/raw/branch/main/ren/"
"ren/": "https://git.pleshevski.ru/pleshevskiy/ren/raw/commit/1a67959b1a19598f8e95bf2ec5f7b1a4c3da4da6/ren/"
}
}

5
log.ts
View file

@ -3,5 +3,8 @@ export function info(...args: unknown[]): void {
}
export function debug(...args: unknown[]): void {
console.log("[DEBUG]", ...args);
// choose better name for this env
if (Deno.env.get("DEBUG") === "1") {
console.log("[DEBUG]", ...args);
}
}

View file

@ -18,7 +18,7 @@ async function main() {
}
async function startServer(cfg: ServerConfig) {
const srv = Deno.listen({ hostname: "localhost", port: cfg.port });
const srv = Deno.listen({ hostname: "0.0.0.0", port: cfg.port });
log.info(`Server listening at http://localhost:${cfg.port}`);
for await (const conn of srv) {