diff --git a/docker-compose.yml b/docker-compose.yml index fac635c..8dc4d8f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,10 +12,6 @@ services: db: image: postgres:16-alpine - environment: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: 868686 - POSTGRES_DB: nouzen volumes: - pgdata:/var/lib/postgresql/data restart: unless-stopped diff --git a/src/routes.legacy.ts b/src/routes.legacy.ts deleted file mode 100644 index 07f8565..0000000 --- a/src/routes.legacy.ts +++ /dev/null @@ -1,32 +0,0 @@ -import Elysia from "elysia"; -import { pathToFileURL } from "bun"; -import { readdirSync } from "fs"; -import { join } from "path"; - -const routes = new Elysia(); - -const modulesPath = join(__dirname, "./modules"); - -for (const folder of readdirSync(modulesPath, { withFileTypes: true })) { - if (folder.isDirectory()) { - const moduleIndex = join(modulesPath, folder.name, "index.ts"); - - try { - const module = await import(pathToFileURL(moduleIndex).href); - - const mod = Object.values(module).find( - (m): m is Elysia => m instanceof Elysia - ); - - if (mod) { - routes.use(mod); - } - } catch (error) { - console.warn( - `Module ${folder.name} not found. Please check the module path or name: ${error}` - ); - } - } -} - -export { routes };