feat(db): db stuff added in starting migration from old app

This commit is contained in:
2025-08-31 15:01:50 -05:00
parent f348e4e053
commit 2d5fbbbab0
11 changed files with 965 additions and 36 deletions

View File

@@ -5,6 +5,8 @@ import { setupRoutes } from "./internal/routerHandler/routeHandler.js";
import { printers } from "./internal/ocp/printers/printers.js";
import path, { dirname, join } from "path";
import { fileURLToPath } from "url";
import { db } from "./pkg/db/db.js";
import { settings } from "./pkg/db/schema/settings.js";
const PORT = Number(process.env.VITE_PORT) || 4200;
@@ -19,7 +21,13 @@ const main = async () => {
const __dirname = dirname(__filename);
// Db connection stuff
try {
const set = await db.select().from(settings);
console.log(set);
} catch (error) {
console.error("Error getting settings", error);
}
// express app
const app = express();