feat(licenses): enhance API and database integration for checkout sessions

- Updated development server port in package.json to 4002.
- Introduced constants for website URLs based on environment.
- Refactored database connection logic to use drizzle with PostgreSQL.
- Added new API endpoint for creating checkout sessions with Stripe integration.
- Implemented utility function to generate Stripe items based on license type and quantity.
- Updated existing API routes to use a router for better organization.
This commit is contained in:
Mauricio Siu
2025-03-20 01:32:13 -06:00
parent 78682fa359
commit feb6970b09
6 changed files with 112 additions and 16 deletions

View File

@@ -0,0 +1,7 @@
import { z } from "zod";
export const createCheckoutSessionSchema = z.object({
type: z.enum(["basic", "premium", "business"]),
serverQuantity: z.number().min(1),
isAnnual: z.boolean(),
});