Merge pull request #421 from mtwn105/fix/tripcraf-ai-410

fix(client): add env config and fix undefined BASE_URL error Fixes #410
This commit is contained in:
Shubham Saboo
2026-01-13 23:58:47 -08:00
committed by GitHub
4 changed files with 34 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
NEXT_PUBLIC_BASE_URL=http://localhost:3000
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/tripcraft_ai

View File

@@ -0,0 +1,11 @@
node_modules
.next
.env*.local
lib/generated/
*.log
.DS_Store
*.pem
.vscode
.idea
.vercel
*.tsbuildinfo

View File

@@ -1,5 +1,25 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
## Setup
1. **Install dependencies:**
```bash
pnpm install
```
2. **Configure environment:**
```bash
cp .env.example .env.local
```
Update `.env.local` with your database credentials if needed.
3. **Setup database:**
```bash
pnpm prisma generate
pnpm prisma db push
```
## Getting Started
First, run the development server:

View File

@@ -1,6 +1,6 @@
import { NextRequest, NextResponse } from "next/server";
const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL
const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
export async function middleware(request: NextRequest) {