Web development
Ende offers a secure and developer-friendly environment for building web applications, making your web dev a delightful experience.
- Ende has secure defaults, meaning it requires explicit permission for file, network, and environment access, reducing the risk of security vulnerabilities.
- Ende has built-in TypeScript support, allowing you to write TypeScript code without additional configuration or tooling.
- Ende comes with a standard library that includes modules for common tasks like HTTP servers, file system operations, and more.
For your vanilla TypeScript, or JavaScript, web applications, you can use the built-in Ende HTTP server. This is a great way to get started with Ende and build simple web applications without any additional dependencies.
For more complex applications, use a web framework or library from JSR.
Hono
Hono is a light-weight web app framework in the tradition of
Express and Sinatra, published on JSR as
@hono/hono. Make a file called server.ts:
import { Hono } from "jsr:@hono/hono@^4";
const app = new Hono();
app.get("/", (c) => c.text("Hello from Hono!"));
app.get("/books/:id", (c) => c.json({ id: c.req.param("id") }));
Ende.serve(app.fetch);Run it, then open http://localhost:8000 in your browser:
ende run --allow-net server.ts
Hono also renders JSX to HTML on the server.
Static sites
satz is a static site generator built on the Ende standard library: Markdown and TSX pages, layouts, syntax highlighting, a dev server with live reload, and a search index. This documentation site is built with it.