Skip to content

Commit

Permalink
chore: rename DB spark_stats to spark_evaluate (#240)
Browse files Browse the repository at this point in the history
Update the docs and the default config to use the new database name.

Signed-off-by: Miroslav Bajtoš <[email protected]>
  • Loading branch information
bajtos authored Jun 3, 2024
1 parent 8a68a79 commit 5b45829
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Set up [PostgreSQL](https://www.postgresql.org/) with default settings:
- Port: 5432
- User: _your system user name_
- Password: _blank_
- Database: spark_stats
- Database: spark_evaluate

Alternatively, set the environment variable `$DATABASE_URL` with
`postgres://${USER}:${PASS}@${HOST}:${PORT}/${DATABASE}`.
Expand All @@ -24,11 +24,18 @@ You can also run the following command to set up the PostgreSQL server via Docke
docker run -d --name spark-db \
-e POSTGRES_HOST_AUTH_METHOD=trust \
-e POSTGRES_USER=$USER \
-e POSTGRES_DB=spark_stats \
-e POSTGRES_DB=spark_evaluate \
-p 5432:5432 \
postgres
```

If you are sharing the same Postgres instance for multiple projects, run the following
command to create a new `spark_evaluate` database for this project:

```bash
psql postgres://localhost:5432/ -c "CREATE DATABASE spark_evaluate;"
```

## Run the tests

```bash
Expand Down
2 changes: 1 addition & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {
// RPC_URLS = 'https://api.node.glif.io/rpc/v0,https://api.chain.love/rpc/v1',
RPC_URLS = 'https://api.node.glif.io/rpc/v0',
GLIF_TOKEN,
DATABASE_URL = 'postgres://localhost:5432/spark_stats',
DATABASE_URL = 'postgres://localhost:5432/spark_evaluate',
SPARK_API = 'https://api.filspark.com'
} = process.env

Expand Down

0 comments on commit 5b45829

Please sign in to comment.