update development.md to continue to work#109
Open
gbumanzordev wants to merge 2 commits into
Open
Conversation
Both apps previously defaulted to port 3000 (server PORT, web
VITE_WEB_PORT), causing a collision when running npm run dev.
Default the Vite dev port to 5173 and inject VITE_WEB_API_URL with
http://localhost:${PORT} in development mode so the web app reaches
the backend out of the box. Production behavior is unchanged
(empty base URL, same-origin requests against the server-served
frontend).
- Document actual dev ports (server 3000, web 5173) and the new zero-config behavior for VITE_WEB_API_URL. - Note that the data/ directory must exist before running migrations, since better-sqlite3 will not create the parent folder. - Fix typo in the migrate:rollback command (npm run -w serverknex -> npm run -w server knex).
Contributor
There was a problem hiding this comment.
Pull request overview
Updates local development defaults and documentation so the repo can be set up and run successfully, aligning the web dev server with Vite’s default port and clarifying/repairing the database setup + migration/seed workflow.
Changes:
- Change the web dev server default port to
5173and inject a default dev API base URL when not configured. - Update
DEVELOPMENT.mdwith corrected ports, a requireddata/directory creation step, and a fixedknexcommand typo.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| apps/web/vite.config.ts | Updates default dev port and wires a default VITE_WEB_API_URL for development builds. |
| DEVELOPMENT.md | Fixes/clarifies local dev setup steps (ports, data dir creation, knex command). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| return defineConfig({ | ||
| plugins: [react(), svgr()], | ||
| css: { postcss: './postcss.config.cjs' }, |
Comment on lines
287
to
+292
| # Delete the database | ||
| rm data/dev.db | ||
|
|
||
| # Make sure the data directory exists | ||
| mkdir -p data | ||
|
|
Comment on lines
+141
to
+143
| - Runs on http://localhost:5173 by default (override with `VITE_WEB_PORT`) | ||
| - Hot module replacement enabled | ||
| - Talks to the API at `http://localhost:${PORT}` in dev (override with `VITE_WEB_API_URL`) |
| | `PORT` | `3000` | Express server (`apps/server`) | | ||
| | `VITE_WEB_PORT` | `5173` | Vite dev server (`apps/web`) | | ||
| | `VITE_WEB_HOSTNAME` | `localhost` | Vite dev server bind host | | ||
| | `VITE_WEB_API_URL` | `http://localhost:${PORT}` in dev, empty in prod | Web app API base URL | |
gbumanzordev
added a commit
to gbumanzordev/KoInsight
that referenced
this pull request
Apr 29, 2026
chore: bring port + data dir dev fixes from upstream PR GeorgeSG#109
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When trying to setup the repository I encountered several issues running the specified commands, this is the changes I made to get the app to work properly and the database migrations/seeding working.