Created
May 4, 2023 12:22
-
-
Save nakasyou/36d09402968ba6e45d358377bd389884 to your computer and use it in GitHub Desktop.
Hono server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Hono } from "https://deno.land/x/hono/mod.ts" | |
import { serveStatic } from "https://deno.land/x/[email protected]/middleware.ts"; | |
import { serve } from 'https://deno.land/std/http/server.ts' | |
const port = Deno.args.length >= 1 ? Deno.args[0] : 8080 | |
const app = new Hono() | |
app.use("/*",serveStatic()) | |
serve(app.fetch,{ | |
port, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
deno install --allow-read --allow-net --force --name honodeno https://gist.githubusercontent.com/nakasyou/36d09402968ba6e45d358377bd389884/raw/3ac0489d75c6178c39eeca20e2d66a4b7ca04774/server.ts