diff --git a/deno.json b/deno.json index 1c3ffc5..c5f8a39 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.6", + "version": "0.0.7", "license": "MIT", "exports": { ".": "./serverus.ts", diff --git a/server.ts b/server.ts index 48982fa..7445356 100644 --- a/server.ts +++ b/server.ts @@ -121,8 +121,7 @@ export class SERVER { continue; } - const import_path = new URL('file://' + entry.path, import.meta.url).toString(); - const handler_module: HANDLER_MODULE = await import(import_path); + const handler_module: HANDLER_MODULE = await import(entry.path); if (typeof handler_module.default !== 'function') { console.warn(`Could not load handler, no default exported function: ${entry.path}`); continue;