We know... we'll delete the .env file later
Install dependencies with npm install
in each respective /client/pet-app
and /server
.
Install npm install sass
Install npm install react-modal
Install npm i
Install npm install sentiment
npm i --save @fortawesome/fontawesome-svg-core
npm install --save @fortawesome/free-solid-svg-icons
npm install --save @fortawesome/react-fontawesome
npm install @fortawesome/react-fontawesome @fortawesome/free-solid-svg-icons
Go to the path: /client/pet-app
and npm run
in the terminal
install to root server directory npm i express pg cors
install to root server directorynpm install --save-dev nodemon
run root server directory to start npm start
DB_NAME= beastly_bonds_development
-
In psql create db:
CREATE DATABASE beastly_bonds_development;
-
Then connect to it:
\c beastly_bonds_development
-
After creating database type
\i db/schema/schema.sql
in psql terminal to create the tables -
To check if tables exist type :
\dt
-
in psql type
\i db/seeds/your_seed.sql
to insert the data to the tables. (replace "your_seed" with the seed file name) -
To test if the seed was inserted in psql:
SELECT * your_table_name;
-
You might find yourself needing to deleting th data from a table you can
DELETE FROM your_table_name
-
To reset the serial id from a table you can
ALTER SEQUENCE your_table_name_id_seq RESTART WITH 1;
Alternatively you can run our bash script files in the terminal to insert all schemas and seed files located in their respective directories (with specified exceptions in the scripts).
For the schemas:
-
Set the correct permissions:
chmod +x server/insert_schemas.sh
-
Run
./server/insert_schemas.sh
Now for the seeds:
-
Set the correct permissions:
chmod +x server/insert_seeds.sh
-
Run
./server/insert_seeds.sh