Skip to main content
Module

x/drash/mod.ts

A microframework for Deno's HTTP server with zero third-party dependencies
Go to Latest
File
// Dictionariesimport HttpStatusCodes from "./src/dictionaries/http_status_codes.ts";import LogLevels from "./src/dictionaries/log_levels.ts";import MimeDb from "https://raw.githubusercontent.com/jshttp/mime-db/master/db.json";// Exceptionsimport HttpException from "./src/exceptions/http_exception.ts";// Httpimport Resource from "./src/http/resource.ts";import Response from "./src/http/response.ts";import Server from "./src/http/server.ts";// Loggersimport Logger from "./src/loggers/logger.ts";import ConsoleLogger from "./src/loggers/console_logger.ts";// Servicesimport * as HttpService from "./src/services/http_service.ts";// Utilimport * as Util from "./src/util.ts";
function Drash(): any { return { Dictionaries: { HttpStatusCodes: HttpStatusCodes, LogLevels: LogLevels, MimeDb: MimeDb }, Exceptions: { HttpException: HttpException }, Http: { Response: Response, Resource: Resource, Server: Server }, Loggers: { Logger: Logger, ConsoleLogger: ConsoleLogger }, Services: { HttpService: HttpService }, Util: Util, Vendor: {},
/** * Add a new member to the Vendor namespace. * * @param string name * The member's name which can be accessed via `Drash.Vendor[name]`. * @param any member */ addMember(name, member) { this.Vendor[name] = member; }, };}export default Drash();