-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #194 from sejori/sejori-patch-1
fix: filenames
- Loading branch information
Showing
11 changed files
with
54 additions
and
53 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
/** | ||
* Featherweight HTTP routing and utils for apps on the edge. | ||
* Featherweight apps on the edge | ||
*/ | ||
|
||
// Core classes, functions & types | ||
export * from "./lib/Router.ts"; | ||
export * from "./lib/types.ts"; | ||
|
||
// Handlers | ||
export * from "./lib/handlers/static.ts"; | ||
export * from "./lib/handlers/ssr.ts"; | ||
export * from "./lib/handlers/file.ts"; | ||
export * from "./lib/handlers/sse.ts"; | ||
export * from "./lib/handlers/ssr.ts"; | ||
|
||
// Middlewares | ||
export * from "./lib/middleware/logger.ts"; | ||
export * from "./lib/middleware/cacher.ts"; | ||
export * from "./lib/middleware/authenticator.ts"; | ||
export * from "./lib/middleware/cacher.ts"; | ||
export * from "./lib/middleware/logger.ts"; | ||
|
||
// Utils | ||
export * from "./lib/utils/CacheItem.ts"; | ||
export * from "./lib/utils/Cascade.ts"; | ||
export * from "./lib/utils/Crypto.ts"; | ||
export * from "./lib/utils/helpers.ts"; | ||
export * from "./lib/utils/Profiler.ts"; | ||
|
||
import { Router } from "./lib/Router.ts"; | ||
export default Router; |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
import router from "../../example/preactSSR/router.ts"; | ||
|
||
// Start Deno server with Peko router :^) | ||
Deno.serve((req) => router.handle(req)); | ||
Deno.serve( | ||
{ | ||
port: 7777, | ||
}, | ||
(req) => router.handle(req) | ||
); | ||
|
||
console.log("Deno server running with Peko router <3"); |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { assert } from "https://deno.land/[email protected]/assert/mod.ts"; | ||
import { Router, RequestContext } from "../../lib/Router.ts"; | ||
import { file } from "../../lib/handlers/static.ts"; | ||
import { file } from "../../lib/handlers/file.ts"; | ||
|
||
Deno.test("HANDLER: Static", async (t) => { | ||
Deno.test("HANDLER: File", async (t) => { | ||
const server = new Router(); | ||
const ctx = new RequestContext(server, new Request("http://localhost")); | ||
const fileURL = new URL(import.meta.url); | ||
|