Move services.ts

This commit is contained in:
2026-01-03 14:12:27 -06:00
parent c246e0384f
commit 39cd93c81e
2 changed files with 4 additions and 3 deletions

42
express/services/index.ts Normal file
View File

@@ -0,0 +1,42 @@
// services.ts
import { AuthService, InMemoryAuthStore } from "../auth";
import { config } from "../config";
import { getLogs, log } from "../logging";
//const database = Client({
//})
const database = {};
const logging = {
log,
getLogs,
};
const random = {
randomNumber: () => {
return Math.random();
},
};
const misc = {
sleep: (ms: number) => {
return new Promise((resolve) => setTimeout(resolve, ms));
},
};
// Initialize auth with in-memory store
const authStore = new InMemoryAuthStore();
const auth = new AuthService(authStore);
const services = {
database,
logging,
misc,
random,
auth,
};
export { services };