You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be helpful to add a guide on how to install your project. I was unable to access the database using your scripts. Oli's guide creates a local db, including the DATABASE_URL dynamically.
I'm not sure if you used the scripts from the node-posgres workshop and forgot to amend it to 'ebargain'
These are the steps i used to access your project:
1) Clone repo 2) In terminal run command npm i 3) Setup local postgres db
a) Comment out your code and paste code from Oli's guide into create_db & populate_db
(i) Amend file path of init.sql file in populate_db file L17 to ./database/init.sql
(ii) Do NOT change any code in create_db file
b)change the permissions on each file to make them executable:
(i) chmod +x ./scripts/create_db
(ii)chmod +x ./scripts/populate_db
c) In terminal run script commands (Note add the name of your db . This will dynamically input this name into all of the locations
(i) ./scripts/create_db <here>
(ii)./scripts/populate_db
Note- this will automatically generate a DATEBASE_URL string for you in the .env file. It will also generate a string for the example.env file. (Both of which who do not need to be changed/deleted as they are needed for when someone else clones the project)
4) Start server by running npm run dev
The text was updated successfully, but these errors were encountered:
Great job in getting time to write a @README. 🎉
Oli's guide creates a local db, including the DATABASE_URL dynamically.
I'm not sure if you used the scripts from the node-posgres workshop and forgot to amend it to 'ebargain'
week2-MCD-eBargain/scripts/populate_db
Line 6 in c2d7acf
These are the steps i used to access your project:
1) Clone repo
2) In terminal run command
npm i
3) Setup local postgres db
a) Comment out your code and paste code from Oli's guide into create_db & populate_db
(i) Amend file path of init.sql file in populate_db file L17 to
./database/init.sql
(ii) Do NOT change any code in create_db file
b)change the permissions on each file to make them executable:
(i)
chmod +x ./scripts/create_db
(ii)
chmod +x ./scripts/populate_db
c) In terminal run script commands (Note add the name of your db . This will dynamically input this name into all of the locations
(i)
./scripts/create_db <here>
(ii)
./scripts/populate_db
Note- this will automatically generate a DATEBASE_URL string for you in the .env file. It will also generate a string for the example.env file. (Both of which who do not need to be changed/deleted as they are needed for when someone else clones the project)
4) Start server by running
npm run dev
The text was updated successfully, but these errors were encountered: