From fd7ecec5fa30e9d5be0d005d7e5376274405b1b1 Mon Sep 17 00:00:00 2001 From: Christian Svensson Date: Tue, 11 Nov 2025 15:34:22 +0100 Subject: [PATCH] docs(core): add small usage & getting started example (#3598) This PR just fills out the `README.md` with minimal usage example, such that they can get a small taste of how the framework can be used. This also helps improve the score in JSR. Part of #3597 --- packages/fresh/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/packages/fresh/README.md b/packages/fresh/README.md index 9930d839..2ac197c1 100644 --- a/packages/fresh/README.md +++ b/packages/fresh/README.md @@ -5,3 +5,27 @@ Standards. It’s designed for building high-quality, performant, and personaliz web applications. [Learn more about Fresh](https://fresh.deno.dev/) + +## Usage + +Generate a new Fresh project with `@fresh/init`: + +```sh +deno run -Ar jsr:@fresh/init +``` + +Add middleware, routes, & endpoints as needed via the `routes/` folder or +directly on the `App` instance. + +```tsx +import { App } from "fresh"; + +const app = new App() + .get("/", () => new Response("hello world")) + .get("/jsx", (ctx) => ctx.render(

render JSX!

)); + +app.listen(); +``` + +For more information on getting started with Fresh, head on over to the +[documentation](https://fresh.deno.dev/docs/introduction).