feat(server): support https (#1599)
This commit is contained in:
@@ -12,7 +12,6 @@ export {
|
|||||||
type Handler as ServeHandler,
|
type Handler as ServeHandler,
|
||||||
serve,
|
serve,
|
||||||
} from "https://deno.land/std@0.193.0/http/server.ts";
|
} from "https://deno.land/std@0.193.0/http/server.ts";
|
||||||
export type { ServeInit } from "https://deno.land/std@0.193.0/http/server.ts";
|
|
||||||
export { Status } from "https://deno.land/std@0.193.0/http/http_status.ts";
|
export { Status } from "https://deno.land/std@0.193.0/http/http_status.ts";
|
||||||
export {
|
export {
|
||||||
typeByExtension,
|
typeByExtension,
|
||||||
|
|||||||
+1
-2
@@ -1,11 +1,10 @@
|
|||||||
import { ComponentChildren, ComponentType, VNode } from "preact";
|
import { ComponentChildren, ComponentType, VNode } from "preact";
|
||||||
import { ServeInit } from "./deps.ts";
|
|
||||||
import * as router from "./router.ts";
|
import * as router from "./router.ts";
|
||||||
import { InnerRenderFunction, RenderContext } from "./render.ts";
|
import { InnerRenderFunction, RenderContext } from "./render.ts";
|
||||||
|
|
||||||
// --- APPLICATION CONFIGURATION ---
|
// --- APPLICATION CONFIGURATION ---
|
||||||
|
|
||||||
export type StartOptions = ServeInit & FreshOptions;
|
export type StartOptions = Partial<Deno.ServeTlsOptions> & FreshOptions;
|
||||||
|
|
||||||
export interface FreshOptions {
|
export interface FreshOptions {
|
||||||
render?: RenderFunction;
|
render?: RenderFunction;
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/// <reference no-default-lib="true" />
|
||||||
|
/// <reference lib="dom" />
|
||||||
|
/// <reference lib="dom.iterable" />
|
||||||
|
/// <reference lib="dom.asynciterable" />
|
||||||
|
/// <reference lib="deno.ns" />
|
||||||
|
|
||||||
|
import { start } from "$fresh/server.ts";
|
||||||
|
import routes from "./fresh.gen.ts";
|
||||||
|
import options from "./options.ts";
|
||||||
|
|
||||||
|
// this just exists to function as a type check to assert that we can actually pass a key and cert in
|
||||||
|
await start(routes, { ...options, key: "test", cert: "test" });
|
||||||
Reference in New Issue
Block a user