Skip to content

Base URL setup

Huang Chen Syuan edited this page May 12, 2025 · 3 revisions

Base URL Setup for Local and Production Environments

This guide walks you through setting up baseURL for local development and production in a project that uses Vue 3 with Vite on the frontend and Node.js on the backend.

1. .env File (Frontend)

Create a .env file at the root of your project (same level as vite.config.js) and add the following:

BASE_URL=http://localhost:3000

✅ Make sure .env is included in .gitignore.

2. Handling Base URL in Vercel (Production)

In Vercel, you can configure the production base URL via Environment Variables in the Vercel dashboard:

  • Go to the Vercel project dashboard.
  • Navigate to Settings > Environment Variables.
  • Add a new variable:
  • Make sure to redeploy the application after adding the variable.

Basic Website

  • Introduction
  • For Everyone
  • For Developers
  • For Designers
  • For Management

GameZone

  • Introduction
  • For Everyone
  • For Developers
  • For Designers
  • For Management

Reusable Vue Components

  • Banner
  • Other Reusable Components (to be added)

Web Accessibility

Introductory Resources

Clone this wiki locally