Files
quicklanch-server/src/server.ts
T

21 lines
535 B
TypeScript
Raw Normal View History

import app from "./app.js";
import { configs } from "./app/configs/index.js";
import { prisma } from "./app/lib/prisma.js";
import "./app/queues/worker.js";
2026-04-02 21:27:09 +06:00
async function main() {
try {
app.listen(configs.port, async () => {
await prisma.$connect();
console.log(`Server is running on port ${configs.port}`);
});
} catch (error) {
console.error("Error starting server:", error);
}
}
main().catch((error) => {
console.error("Error in main function:", error);
process.exit(1);
});