- NestJS backend: auth, restaurants, orders, drivers, payments, tracking, reviews, zones, admin, email - Next.js 14 frontend: landing, restaurants, checkout, tracking, dashboards, onboarding - Expo mobile app: driver orders and earnings screens - PostgreSQL + PostGIS schema with seed data - Docker Compose for local dev (Postgres, Redis, OSRM) - MapLibre GL + OpenStreetMap integration - Stripe subscription and payment processing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
33 lines
741 B
TypeScript
33 lines
741 B
TypeScript
import { NestFactory } from '@nestjs/core';
|
|
import { ValidationPipe } from '@nestjs/common';
|
|
import { AppModule } from './app.module';
|
|
|
|
async function bootstrap() {
|
|
const app = await NestFactory.create(AppModule);
|
|
|
|
app.enableCors({
|
|
origin: [
|
|
process.env.FRONTEND_URL || 'http://localhost:3000',
|
|
'http://localhost:3000',
|
|
'http://localhost:19006', // Expo dev server
|
|
],
|
|
credentials: true,
|
|
});
|
|
|
|
app.setGlobalPrefix('api/v1');
|
|
|
|
app.useGlobalPipes(
|
|
new ValidationPipe({
|
|
whitelist: true,
|
|
transform: true,
|
|
forbidNonWhitelisted: true,
|
|
}),
|
|
);
|
|
|
|
const port = process.env.PORT || 3001;
|
|
await app.listen(port);
|
|
console.log(`The Vibe API running on port ${port}`);
|
|
}
|
|
|
|
bootstrap();
|