Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README doesn't show how to download project. #18

Open
1 task
fi-ya opened this issue Oct 7, 2021 · 0 comments
Open
1 task

README doesn't show how to download project. #18

fi-ya opened this issue Oct 7, 2021 · 0 comments

Comments

@fi-ya
Copy link

fi-ya commented Oct 7, 2021

Great job in getting time to write a @README. 🎉

  • 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'

psql learn_pg -q -f "./database/init.sql"


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant