Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fastro/mod.ts>Context

Full Stack Framework for Deno, TypeScript, Preact JS and Tailwind CSS
Go to Latest
class Context
Re-export
import { Context } from "https://deno.land/x/fastro@v0.93.2/mod.ts";

Define the information for a HTTP request, render, send & options

Index Signatures

[key: string]: any

Properties

Information for a HTTP request.

Deno KV Instance defined in Fastro Constructor

next: Next

Middleware callback

options: Record<string, any>

Server options defined in Fastro Constuctor

render: <T>(data?: T | undefined, headers?: Headers) => Response | Promise<Response>

Render a JSX Component or a Page with data

  • If you call it from a standart handler (GET, POST, PUT, DELETE), it will render a JSX component.
  • If you call it from a page handler, it will render the data using the predefined JSX layout.
send: <T>(
data?: T | undefined,
status?: number | undefined,
headers?: Headers,
) => Response | Promise<Response>

Send data to client

server: Fastro

Instance of server

store: Store<string | number | symbol, any>

Server store. Save temporary key-value with TTL

url: URL

The URL interface represents an object providing static methods used for creating object URLs.