78a9b99aae
- Added `customerEmail` field to Order model. - Made `customerNote` optional in the Order model. - Updated order creation logic to send a tracking email. - Updated order validation to handle optional fields. - Refactored configurations import path from `errors/configs` to `configs`. - Minor modifications across account and order services for consistency.
21 lines
523 B
TypeScript
21 lines
523 B
TypeScript
import app from "./app";
|
|
import { configs } from "./app/configs/index";
|
|
import { prisma } from "./app/lib/prisma";
|
|
import "./app/queues/worker";
|
|
|
|
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);
|
|
});
|