0f7af70b90
Updated Docker configuration, refactored middleware for improved error handling, and restructured account, order, plan, profile, and support modules, including their routes, services, and validations. Enhanced email processing queues and utilities for token generation, pagination, and response management to streamline the application architecture and enhance maintainability.
20 lines
551 B
JavaScript
20 lines
551 B
JavaScript
import app from "./app.js";
|
|
import { configs } from "./app/configs/index.js";
|
|
import { prisma } from "./app/lib/prisma.js";
|
|
import "./app/queues/worker.js";
|
|
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);
|
|
});
|