Getting started

Setup a simple Mage app using these steps.

Install

Install Mage from JSR.

deno add jsr:@mage/app

Write your first app

The simplest app you can write with Mage is a simple "Hello, World!" app! Add the following to your main.ts file.

import { MageApp } from "@mage/app";

const app = new MageApp();

app.get("/", async (c) => {
  c.text("Hello, world!");
});

Deno.serve(app.handler);

Run your app

Run your app with Deno.

deno run --allow-all main.ts