Skip to main content
Module

x/ultra/workspace/oak.ts

πŸ’Ž Modern Streaming React Framework in Deno
Go to Latest
File
import { Application, Router } from "https://deno.land/x/oak@v10.5.1/mod.ts";import { ultraHandler } from "../src/oak/handler.ts";
const port = 8000;
const app = new Application();const router = new Router();
router.get("/custom-route", (context) => { context.response.body = "#1";});
app.use(router.routes());app.use(router.allowedMethods());
// ULTRA middleware// needs to go AFTER your custom routes// it acts as the final catch all when no// other route matchesapp.use(ultraHandler);
console.log(`Ultra + Oak listening on http://localhost:${port}`);await app.listen({ port });