Add proxy configuration for single-port development
Configure SvelteKit dev server to proxy API requests to Elysia backend, allowing users to access the application on a single port (5173). ## Changes - Add proxy config to vite.config.js for /api requests - Update API client to use relative URLs (/api) - Add convenience 'dev' script to start both servers - Update README with single-port instructions - Add architecture section explaining proxy setup Benefits: - Single port to access (5173) - HMR still works for frontend - No CORS issues - Backend runs hidden on port 3001 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "bun run src/backend/index.js & cd src/frontend && bun run dev",
|
||||
"dev:backend": "bun run src/backend/index.js",
|
||||
"dev:frontend": "cd src/frontend && bun run dev",
|
||||
"db:generate": "drizzle-kit generate",
|
||||
|
||||
Reference in New Issue
Block a user