- Introduced CountryStep component for selecting the country during onboarding, affecting payment currency. - Updated FirstGroupStep to include country information. - Enhanced PaymentsProvider to manage payment states and renewals. - Created PaymentRow component for displaying individual payment details. - Implemented PaymentsView for listing and filtering payments by group and status. - Added API endpoints for fetching and creating payments, including batch processing. - Defined payment schemas for validation and data handling. - Updated GroupHeader and GroupDetailView to include charging functionality for group members.
30 lines
629 B
TypeScript
30 lines
629 B
TypeScript
import app from '@/app';
|
|
import { getPrismaClient } from '@/lib/prisma';
|
|
import { logger } from '@/logger';
|
|
import { startMpJobs } from '@/modules/mp';
|
|
import { startPaymentJobs } from '@/modules/payments';
|
|
|
|
const port = Number(process.env.PORT ?? 4000);
|
|
|
|
logger.info(`Server running on http://localhost:${port}`);
|
|
|
|
const server = Bun.serve({
|
|
port,
|
|
fetch: app.fetch,
|
|
});
|
|
|
|
startMpJobs();
|
|
startPaymentJobs();
|
|
|
|
async function shutdown(): Promise<void> {
|
|
server.stop(true);
|
|
await getPrismaClient().$disconnect();
|
|
}
|
|
|
|
process.once('SIGINT', () => {
|
|
void shutdown();
|
|
});
|
|
|
|
process.once('SIGTERM', () => {
|
|
void shutdown();
|
|
}); |