fix: let's try yet another way to try to do this

This commit is contained in:
Andy Burke 2025-06-22 13:51:40 -07:00
parent e1d914a28b
commit 9bbece2601
2 changed files with 2 additions and 3 deletions

View file

@ -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",

View file

@ -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;