Skip to main content
Module

x/cav/deps.ts

A server framework for Deno
Go to Latest
import * as mod from "https://deno.land/x/cav@0.0.21/deps.ts";

Classes

An interface to the web assembly structure of a built module graph.

Used to construct an HTTP server.

Enums

Enum of HTTP status codes.

Functions

Decodes a given RFC4648 base64 encoded string

CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727 Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation

Serves the files under the given directory root (opts.fsRoot).

Returns an HTTP Response with the requested file as the body.

A Deno specific loader function that can be passed to the createModuleGraph which will use Deno.readTextFile for local files, or use fetch() for remote modules.

Parse a module based on the supplied information and return its analyzed representation. If an error is encountered when parsing, the function will throw.

Set the cookie header with empty value in the headers to delete it

Parse cookies of a header

Serves HTTP requests with the given handler.

Constructs a server, accepts incoming connections on the given listener, and handles requests on these connections with the given handler.

Serves HTTPS requests with the given handler.

Set the cookie header properly in the headers

Determines the common path from a set of paths, using an optional separator, which defaults to the OS default separator.

Convert a glob string to a regular expression.

Test whether the given string is a glob

Like join(), but doesn't collapse "**/.." when globstar is true.

Like normalize(), but doesn't collapse "**/.." when globstar is true.

Interfaces

Additional meta data that is used to enrich the output of the module graph.

The plain-object representation of a module graph that is suitable for serialization to JSON.

Information about the connection a request arrived on.

Additional serve options.

Options for running an HTTP server.

A parsed path object generated by path.parse() or consumed by path.format().

Type Aliases

The kind of module.

A handler for HTTP requests. Consumes a request and connection information and returns a response.