Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/filecoin-station/voyager-stats
API exposing public statistics about Voyager
https://github.com/filecoin-station/voyager-stats
Last synced: 3 months ago
JSON representation
API exposing public statistics about Voyager
- Host: GitHub
- URL: https://github.com/filecoin-station/voyager-stats
- Owner: filecoin-station
- License: other
- Created: 2024-04-08T17:45:50.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-28T07:28:24.000Z (5 months ago)
- Last Synced: 2024-08-28T08:45:37.916Z (5 months ago)
- Language: JavaScript
- Size: 266 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# voyager-stats
API exposing public statistics about Voyager
## Development
### Database
Set up [PostgreSQL](https://www.postgresql.org/) with default settings:
- Port: 5432
- User: _your system user name_
- Password: _blank_
- Database: voyager_publicAlternatively, set the environment variable `$DATABASE_URL` with
`postgres://${USER}:${PASS}@${HOST}:${POST}/${DATABASE}`.The Postgres user and database need to exist already, and the user
needs full management permissions for the database.You can also run the following command to set up the PostgreSQL server via Docker:
```bash
docker run -d --name voyager-db \
-e POSTGRES_HOST_AUTH_METHOD=trust \
-e POSTGRES_USER=$USER \
-e POSTGRES_DB=voyager_public \
-p 5432:5432 \
postgres
```Finally, run database schema migration scripts from voyager-evaluate.
```bash
npm run migrate
```### Run the test suite
```sh
npm test
```### Run the service
```sh
npm start
```You can also run the service against live data in Voyager DB running on Fly.io.
1. Set up a proxy to forward connections to Voyager DB Postgres. Connect to the reader replica running
on port 5433 (not 5432).The command below will forward connections to local post 5455 to Voyager DB's reader replica.
```
fly proxy 5455:5433 -a voyager-db
```2. Start the service and configure the database connection string to use the proxied connection.
Look up the user and the password in our shared 1Password vault.```
DATABASE_URL="postgres://user:password@localhost:5455/voyager_public" npm start
```## Deployment
```
git push
```