diff options
author | Pawel Zelawski <pawel.zelawski@outlook.com> | 2025-04-10 10:46:15 +0200 |
---|---|---|
committer | Pawel Zelawski <pawel.zelawski@outlook.com> | 2025-04-10 10:46:15 +0200 |
commit | ef435a15ca67c829ce6cd8551ac45c419cb9792e (patch) | |
tree | d8c1cbe036370d6952a306f0fea0a7de3522ae31 /vite.config.ts | |
parent | b290aec2899208169b5f90c9e2b66ebffd565a87 (diff) |
feat: setup project structure and tooling
- Initialized npm project and added core dependencies (React, Express, etc.).
- Added development dependencies (TypeScript, Vite, ESLint, Prettier, etc.).
- Configured TypeScript (`tsconfig.json`).
- Configured Vite (`vite.config.ts`) with React plugin and API proxy.
- Configured ESLint (`.eslintrc.cjs`) and Prettier (`.prettierrc.cjs`, `.prettierignore`).
- Added standard `.gitignore`.
- Created basic project structure (`src/client`, `src/server`, `public`).
- Created default `.env` file (PORT=3001, PUBLIC_URL=http://localhost:3001).
Diffstat (limited to 'vite.config.ts')
-rw-r--r-- | vite.config.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..5e62e9a --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], + server: { + proxy: { + // Proxy /api requests to the backend server (running on port 3001 by default) + '/api': { + target: 'http://localhost:3001', // Default backend port, adjust if needed + changeOrigin: true, // Recommended for virtual hosted sites + secure: false, // Don't verify SSL certs if backend uses self-signed cert in dev + }, + }, + }, +});
\ No newline at end of file |