Skip to content
This repository was archived by the owner on May 25, 2024. It is now read-only.

Commit 45831fb

Browse files
committed
fix log
1 parent b290b41 commit 45831fb

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

demo/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const server = new NaxtServer(
99
liveReload: args[0] === "--dev" ? true : false,
1010
onInit: (c) => {
1111
console.log(
12-
` %c${c.req.method ? c.req.method : "Unknown"} ${c.req.path}`,
13-
"color: #0FF000"
12+
`[ %c${c.req.method ? c.req.method : "Unknown"} %c] "%c${c.req.path}"`,
13+
"color: #0FF000", "color: #FFFFFF", "color: #FFEEEE"
1414
);
1515
}, // Functions executed at access time on all routes
1616
}

packages/server/mod.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ export class NaxtServer {
140140
for (const route of this.routes) {
141141
try {
142142
if (route.target == "/_onError") {
143-
this.hono.onError(route.module);
143+
this.hono.onError(route.module as ErrorHandler);
144144
} else if (route.target == "/_notFound") {
145-
this.hono.notFound(route.module);
145+
this.hono.notFound(route.module as NotFoundHandler);
146146
}
147-
this.hono.all(route.target as string, route.module);
147+
this.hono.all(route.target as string, route.module as Handler);
148148
} catch (e: string | unknown) {
149149
console.error(" 🌊: Failed Patch '" + route.target + "' \n " + e);
150150
}

0 commit comments

Comments
 (0)