diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-05-01 19:10:47 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-05-01 19:10:47 +0900 |
| commit | 97ae778f538285f2e82c08485a7e23be6747a507 (patch) | |
| tree | 9a7f83b18522b0106b7687135c46694bebd8196f | |
| parent | aa4bf8fa5d7a1ad05f056a0c2ee2121586d3fd3b (diff) | |
| download | nsfisis.dev-97ae778f538285f2e82c08485a7e23be6747a507.tar.gz nsfisis.dev-97ae778f538285f2e82c08485a7e23be6747a507.tar.zst nsfisis.dev-97ae778f538285f2e82c08485a7e23be6747a507.zip | |
feat(blog/nuldoc): use 127.0.0.1 for local server
| -rwxr-xr-x | vhosts/blog/nuldoc | 2 | ||||
| -rw-r--r-- | vhosts/blog/nuldoc-src/commands/serve.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vhosts/blog/nuldoc b/vhosts/blog/nuldoc index 3ce9f0e2..a542a30f 100755 --- a/vhosts/blog/nuldoc +++ b/vhosts/blog/nuldoc @@ -6,7 +6,7 @@ base_dir="$(dirname "$BASH_SOURCE")" deno run \ --allow-read="$base_dir" \ --allow-write="$base_dir" \ - --allow-net="0.0.0.0:8000" \ + --allow-net="127.0.0.1:8000" \ --allow-env=VSCODE_TEXTMATE_DEBUG \ "$base_dir/nuldoc-src/main.ts" \ "$@" diff --git a/vhosts/blog/nuldoc-src/commands/serve.ts b/vhosts/blog/nuldoc-src/commands/serve.ts index a78dda5d..67966760 100644 --- a/vhosts/blog/nuldoc-src/commands/serve.ts +++ b/vhosts/blog/nuldoc-src/commands/serve.ts @@ -5,7 +5,7 @@ import { runBuildCommand } from "./build.ts"; export function runServeCommand(config: Config) { const rootDir = join(Deno.cwd(), config.locations.destDir); - Deno.serve(async (req) => { + Deno.serve({ hostname: "127.0.0.1" }, async (req) => { const pathname = new URL(req.url).pathname; if (!pathname.endsWith("css") && !pathname.endsWith("svg")) { await runBuildCommand(config); |
