- Remove Bunserver and just use buns type
All checks were successful
Code quality checks / biome (push) Successful in 10s
All checks were successful
Code quality checks / biome (push) Successful in 10s
- Stop logging every start aswell as available routes
This commit is contained in:
parent
69f0c3d8e9
commit
2eebc3126a
5 changed files with 18 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
|||
import { resolve } from "node:path";
|
||||
import { echo } from "@atums/echo";
|
||||
import { Echo, echo } from "@atums/echo";
|
||||
import { environment } from "@config";
|
||||
import {
|
||||
type BunFile,
|
||||
|
@ -37,12 +37,15 @@ class ServerHandler {
|
|||
},
|
||||
});
|
||||
|
||||
echo.info(`Server running at http://${server.hostname}:${server.port}`);
|
||||
const echoChild = new Echo({ disableFile: true });
|
||||
|
||||
this.logRoutes();
|
||||
echoChild.info(
|
||||
`Server running at http://${server.hostname}:${server.port}`,
|
||||
);
|
||||
this.logRoutes(echoChild);
|
||||
}
|
||||
|
||||
private logRoutes(): void {
|
||||
private logRoutes(echo: Echo): void {
|
||||
echo.info("Available routes:");
|
||||
|
||||
const sortedRoutes: [string, string][] = Object.entries(
|
||||
|
@ -122,7 +125,7 @@ class ServerHandler {
|
|||
|
||||
private async handleRequest(
|
||||
request: Request,
|
||||
server: BunServer,
|
||||
server: Server,
|
||||
): Promise<Response> {
|
||||
const extendedRequest: ExtendedRequest = request as ExtendedRequest;
|
||||
extendedRequest.startPerf = performance.now();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue