diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..3646d14 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +PORT=8000 diff --git a/.gitignore b/.gitignore index 1f33a07..bbb42eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +bunker bunker.db files/ +.env diff --git a/deno.jsonc b/deno.jsonc index 5c4db37..4a97855 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -4,6 +4,8 @@ "indentWidth": 4 }, "tasks": { - "check": "deno check main.ts" + "check": "deno check main.ts", + "dev": "deno run -A --unstable-ffi --env main.ts", + "compile": "deno compile --allow-net --allow-read --allow-env --allow-write --allow-ffi --allow-run --unstable-ffi --env main.ts" } } diff --git a/main.ts b/main.ts index 16fe1a7..47d3df5 100644 --- a/main.ts +++ b/main.ts @@ -235,4 +235,4 @@ new oak.Application() index: "index.html", }); }) - .listen({ port: 8000 }); + .listen({ port: parseInt(Deno.env.get("PORT")!) });