https://github.com/samdouble/biblio-api
https://github.com/samdouble/biblio-api
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/samdouble/biblio-api
- Owner: samdouble
- Created: 2025-01-05T00:51:02.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-12T23:33:11.000Z (over 1 year ago)
- Last Synced: 2025-07-11T15:32:45.609Z (12 months ago)
- Language: Go
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
[](https://github.com/samdouble/biblio-api/actions/workflows/checks.yml)
[](https://go.dev/)
[](https://cloud.google.com/)
[](https://www.digitalocean.com/)
# biblio-api
## Development
Create a `.env` file with the following variables:
```
GOOGLE_BOOKS_API_TOKEN=
MONGO_DBNAME=
MONGO_URL=
```
## Docker
Instantiate the MongoDB replica set:
```sh
docker compose up -d
```
Build the Docker image:
```sh
docker build -t biblio-api .
```
Run the Docker container with the book's ISBN as a command line argument:
```sh
docker run --env-file .env --network biblio-api_default -e "MONGO_URL=mongodb://biblio-api-mongo0:27017,biblio-api-mongo1:27017,biblio-api-mongo2:27017/?replicaSet=rs0" biblio-api
```