Skip to content

Commit

Permalink
feat: Improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
letehaha committed Jul 16, 2023
1 parent 5efaf3c commit dfa292a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,29 @@ npm run dev
2. Run `nvm use`
3. That's it!

### Guide to setup postgres DB and Redis from scratch

If you can access your user and you know how to create a DB, **you can ignore that section**.

If you don't know how to access your postgres user or DB:
1. Install Postgres.app for all existing postgres version [here](https://postgresapp.com/downloads.html) (it will install all needed Posgres versions).
2. Open the app, in the interface click on the "+" on the bottom left and add a new V11 server.
3. Click "Initialize" button from the interface.
4. If you have error "Post already in use", try to close apps that are using that port. Otherwise click on the server V11 in the interface and change port to 5433
5. Connect to default DB user using "psql -h localhost -p 5432 -U postgres -d postgres". If you changed port on the previos step, update the port
6. Now run following commands to setup a user (update dumb values with you own):
- "CREATE USER `myuser` WITH PASSWORD `'secretpassword'`;"
- ALTER ROLE `myuser` SUPERUSER;
- CREATE DATABASE `db-name`; (db-name will be used for the app)
- \d (to close the connection)
- psql -h localhost -p 5432 -U `myuser` -d `db-name`
7. That's it.

To install Redis (if you don't have one):
1. Install Redis via `brew install redis`
2. Then `brew services start redis`
3. You're done :)

### Current DB schema

![budget-tracker-schema](https://user-images.githubusercontent.com/12257282/147393125-de1c8815-023e-49d4-b337-20cfaea06552.png)

0 comments on commit dfa292a

Please sign in to comment.