diff --git a/deno.json b/deno.json index 535aca2..f845be0 100644 --- a/deno.json +++ b/deno.json @@ -1,7 +1,7 @@ { "name": "@andyburke/serverus", "description": "A flexible HTTP server for mixed content. Throw static files, markdown, Typescript and (hopefully, eventually) more into a directory and serverus can serve it up a bit more like old-school CGI.", - "version": "0.0.10", + "version": "0.0.11", "license": "MIT", "exports": { ".": "./serverus.ts", diff --git a/server.ts b/server.ts index 0e4a3be..648a951 100644 --- a/server.ts +++ b/server.ts @@ -7,10 +7,7 @@ import * as colors from '@std/fmt/colors'; import * as path from '@std/path'; const DEFAULT_HANDLER_DIRECTORIES = [import.meta.resolve('./handlers')]; -console.dir({ - meta: import.meta, - DEFAULT_HANDLER_DIRECTORIES -}); + /** A `HANDLER` must take a `Request` and return a `Response` if it can handle it. */ type HANDLER = (request: Request) => Promise | Response | null | undefined; @@ -114,10 +111,7 @@ export class SERVER { try { const handlers_index = await import(index_file); - console.dir({ - index_file, - handlers_index - }); + for (const handler_name of Object.keys(handlers_index.default)) { const handler_module: HANDLER_MODULE = handlers_index.default[handler_name]; if (typeof handler_module?.default !== 'function') {