Skip to content

The-Marcy-Lab-School/7-3-useEffect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

7-3-useEffect

1. Create a local Postgres database

createdb todos_db

2. Configure environment variables

cp server/.env.template server/.env

Fill in your Postgres credentials. The pg library reads PGHOST, PGPORT, PGUSER, PGPASSWORD, and PGDATABASE from the environment automatically.

3. Install dependencies

cd server && npm install
cd ../frontend && npm install

4. Seed the database

cd server && npm run db:seed

5. Start both dev servers

# Terminal 1 — Express API on http://localhost:8080
cd server && npm run dev

# Terminal 2 — Vite dev server on http://localhost:5173
cd frontend && npm run dev

Open the app at http://localhost:5173, not 8080. The Vite dev server proxies /api/* to Express on port 8080. Because the browser treats both as the same origin, session cookies flow through transparently.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors