| self_link | https://fart.fart.tools/server-architecture |
|---|
You can spin up the Fart Serer on your machine in one command (assuming Deno is installed).
deno run --allow-net --allow-read --allow-env --unstable https://github.com/EthanThatOneKid/fart/raw/main/std/server/serve_http.tsLocal Variation
deno run --allow-net --allow-read --allow-env --unstable std/server/serve_http.tsIf you haven't already,
install deployctl, a
runtime that simulates Deno Deploy.
deno install --allow-read --allow-write --allow-env --allow-net --allow-run --no-check -f https://deno.land/x/deploy/deployctl.tsTo run the development server, enter the below command into your terminal.
deployctl run --watch std/server/worker.tsThis page renders and serves the README.md of https://github.com/EthanThatOneKid/fart/.
This middleware serves static files located under
/std/server/static/.
Any markdown files located under
/docs are rendered
and served.
This middleware serves the compiled result of any Fart source file publicly hosted on GitHub.
If no matching public GitHub source Farts can be found, the request checks to see if there is any raw Fart code in the body. If so, the server will generate the code based on the source Fart from the request body.
This is a more detailed diagram of the pattern that the compilation middlware snags on.
/[registry]/[owner]/[project_name]/[branch]/[...path].*
/go/EthanThatOneKid/fart/main/ex/pokemon/mod.go/ts/EthanThatOneKid/fart/main/ex/pokemon/mod.ts/ts.deno/EthanThatOneKid/fart/main/ex/pokemon/mod.ts/ts.deno.api/EthanThatOneKid/fart/main/ex/pokemon/mod.ts/html.highlight/EthanThatOneKid/fart/main/ex/pokemon/mod.html