4

The next-gen web framework.

 1 year ago
source link: https://fresh.deno.dev/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

The next-gen web framework.

deno is drinking fresh lemon squash

The next-gen web framework.

Fresh is a next generation web framework, built for speed, reliability, and simplicity. Some stand out features:

Just-in-time rendering on the edge.
Island based client hydration for maximum interactivity.
Zero runtime overhead: no JS is shipped to the client by default.
No build step.
No configuration necessary.
TypeScript support out of the box.

Fresh embraces the tried and true design of server side rendering and progressive enhancement on the client side.

Getting started

⚠️ Do not use `fresh` for production usecases yet, unless you are very actively tracking the `fresh` repository for updates. The framework is still undergoing very frequent core functionality changes. You can expect a mostly stable release very soon.

To get started, make sure you have the Deno CLI installed.

Then, run the following command to install the `fresh` CLI:

deno install -A -f --no-check -n fresh -r https://raw.githubusercontent.com/lucacasonato/fresh/main/cli.ts

Once installed, you can use the `fresh` command to bootstrap a new project:

fresh init my-app

Enter the newly created project directory and run the following command to start the development server:

deno task start

You can now open http://localhost:8000 in your browser to view the page.

A more in-depth getting started guide is available in the docs.

Example

This text is being server side rendered on the fly. It was rendered at 08:54:37 UTC.

The counter below was rendered on the server with a starting value of 3, and was then hydrated on the client to provide interactivity. Try out the buttons!

Only the JS required to render that counter is sent to the client.

© 2022 the fresh authors

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK