feat: initial boilerplate
This commit is contained in:
16
api/libraries/server/storage.ts
Normal file
16
api/libraries/server/storage.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { AsyncLocalStorage } from "node:async_hooks";
|
||||
|
||||
import type { Session } from "~libraries/auth/mod.ts";
|
||||
|
||||
export const asyncLocalStorage = new AsyncLocalStorage<{
|
||||
session?: Session;
|
||||
info: {
|
||||
method: string;
|
||||
start: number;
|
||||
end?: number;
|
||||
};
|
||||
socket?: WebSocket;
|
||||
response: {
|
||||
headers: Headers;
|
||||
};
|
||||
}>();
|
||||
Reference in New Issue
Block a user