Skip to content

Commit 3140001

Browse files
committed
docs: minor improvements and rewordings in README
1 parent b1e069c commit 3140001

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

README.md

+12-20
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Documentation about the exposed API and how to interact with the Homebrew Hub in
2222

2323
## Local Development
2424

25+
### 1. Prerequisites
26+
2527
To run a complete local instance of Homebrew Hub, let's start with:
2628

2729
```sh
@@ -32,9 +34,7 @@ git clone https://github.com/gbdev/homebrewhub
3234
cd homebrewhub
3335
```
3436

35-
### 1. Prerequisites
36-
37-
No matter if you choose the local setup or the docker one, you will need a couple of pre-requirements on the system:
37+
Now, no matter if you choose the local setup or the docker one, you will need a couple of pre-requirements on the system:
3838

3939
- `pre-commit` <br>
4040
E.g. Install it from pip:
@@ -51,6 +51,9 @@ No matter if you choose the local setup or the docker one, you will need a coupl
5151
To populate the database, we'll need some sources. Here's how to pull all the 'official' databases (you need at least one):
5252

5353
```bash
54+
# Let's move to a subdirectory
55+
cd db-sources
56+
5457
# GB/GBC
5558
git clone https://github.com/gbdev/database/ db-sources/database-gb
5659
# GBA
@@ -64,16 +67,16 @@ make init-db
6467

6568
### 3A. Docker based requirements
6669

67-
First, install Docker ([download link](https://docs.docker.com/get-docker/)).
70+
First, install Docker ([download link](https://docs.docker.com/get-docker/)), and compose.
6871

6972
After that, follow the steps below to get started running the project using containers:
7073

7174
```bash
7275
# Start up backing services (web server, database and database admin)
7376
# NOTE: This command will also take care of synchronising the database (including migrations)
74-
docker-compose up --build
77+
docker compose up --build
7578

76-
# Once that's finished, in another terminal, query the /api/all route to see if everything's there
79+
# Once that's finished, from another shell, query the /api/all route to see if everything's there
7780
curl https://localhost:8000/api/all
7881
```
7982

@@ -92,10 +95,7 @@ Next, install Postgres 12 ([download link](https://www.postgresql.org/download/)
9295
After that, follow the steps below to get started running the project manually:
9396

9497
```bash
95-
# Clone the repo locally
96-
git clone https://github.com/gbdev/homebrewhub
97-
98-
# Change into the cloned repo
98+
# Make sure you are in the cloned repository
9999
cd homebrewhub
100100

101101
# Set up a virtual env
@@ -116,12 +116,6 @@ python3 manage.py makemigrations hhub
116116
# Sync the database for the first time
117117
python3 manage.py migrate
118118

119-
# Clone the database repositories
120-
# GB/GBC
121-
git clone https://github.com/gbdev/database/
122-
# GBA
123-
git clone https://github.com/gbadev-org/games database-gba
124-
125119
# Populate with the entries from the database repository
126120
DATABASE_URL=postgres://yourpostgresuserhere:yourpostgrespasswordhere@localhost:5432/hh python3 manage.py runscript sync_db
127121

@@ -147,7 +141,7 @@ The "real" database needs to be built (and updated when a commit gets pushed) fr
147141

148142
> Keep in mind that the two are not equivalent, as the Django database will keep additional values about each entry (e.g. simple analytics).
149143
150-
Every time you want to trigger a database sync (e.g. you pulled some updates on the games database):
144+
Every time you want to trigger a database sync (e.g. you pulled some updates on the games database), run:
151145

152146
```bash
153147
python3 manage.py runscript sync_db
@@ -157,6 +151,4 @@ python3 manage.py runscript sync_db
157151

158152
Now that you have your Homebrew Hub backend up and running, you can check [Virens](https://github.com/gbdev/virens), our VueJS based frontend shipping web assembly builds of mGBA and binjgb to actually play all these entries directly on a browser :D
159153

160-
### Legacy
161-
162-
If you were looking for old version written in Node/Express, check [homebrewhub-legacy](https://github.com/gb-archive/homebrewhub-legacy).
154+
Remember to set `BASE_API_URL=http://localhost:8000` so the API calls from Virens will point to the backend we just brought up.

0 commit comments

Comments
 (0)