A full-stack social app that matches and links the dogs for walks and play-dates. Matches are made based on detailed dog profiles and geographical location.
- After cloning the repo, inside
express-server/
folder create a file.env.development
and copy the contents of.env.example
into it. - Fill in the contents:
pghost - localhost
pguser - 'your pg user'
pgdatabase - paws
pgpassword - development
pgport - 5432
- In the 'express-server' folder type in
psql
. - Create new database:
CREATE DATABASE paws;
- Enter it with the command:
\c paws;
- Add the dt schema:
\i src/db/schema/01_schema.sql;
- Populate dt with:
\i src/db/seeds/01_seeds.sql;
To view the contents, run:
SELECT * FROM owners;
SELECT * FROM dogs;
If need to reset dt, run:
\i src/db/schema/01_schema.sql;
To delete dt and start over:
psql
DROP DATABASE IF EXISTS paws;
npm start
Dogs:
localhost:8001/api/dogs
Owners:
localhost:8001/api/owners
Paste localhost:8001/api/debug/reset
in your browser while server is running