fix: add deno compile entry (#3189)

Fixes https://github.com/denoland/fresh/issues/3123
This commit is contained in:
Marvin Hagemeister
2025-08-05 14:53:08 +02:00
committed by GitHub
parent 2f76a0a2aa
commit 71b7d922ea
6 changed files with 129 additions and 16 deletions
+20
View File
@@ -0,0 +1,20 @@
---
description: "Generate a self contained executable with deno compile."
---
You can create a self-contained executable out of your app with the
[`deno compile` command](https://docs.deno.com/runtime/reference/cli/compile/).
It will include all assets and dependencies. This executable can run on any
platform without requiring Deno to be installed.
```sh
# Build your app first
$ deno task build
# Generate self-contained executable
deno compile --include static --include _fresh --include deno.json -A my-app _fresh/compiled-entry.js
```
The compiled entry supports two environment variables out of the box:
- `PORT` to set the port number (`PORT=4000 my-app`)
- `HOSTNAME` to set the host name number (`HOSTNAME=0.0.0.0 my-app`)
+1
View File
@@ -60,6 +60,7 @@ const toc: RawTableOfContents = {
link: "canary",
pages: [
["deno-deploy", "Deno Deploy", "link:canary"],
["deno-compile", "deno compile", "link:canary"],
["docker", "Docker", "link:canary"],
],
},