Compare commits
3 commits
890c1f74ed
...
c97e3eacb6
Author | SHA1 | Date | |
---|---|---|---|
c97e3eacb6 | |||
8409d472bf | |||
cd91329be0 |
3 changed files with 6 additions and 3 deletions
|
@ -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
5
log.ts
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue