With Version 2, this Open Source project is now open for contribution! You can help by improving the documentation, submitting bug reports & feature requests, writing code or enhancing the actual API data.
-
Option 1
- 🍴 Fork this repo!
-
Option 2
- 👯 Clone this repo to your local machine using
https://github.com/gitfrosh/lotr-api.git
- 👯 Clone this repo to your local machine using
- install Docker
- if running on Linux, follow the install instructions for your distro
- otherwise, see Rancher Desktop
- if running Rancher Desktop on Windows, after installing go to File → Preferences → WSL → Integrations and check the "Ubuntu" box
- build and run the node command line image, which will automatically install the packages for both the backend and frontend apps:
make build
- if you get an error like this:
ERROR: failed to solve: error getting credentials - err: exit status 127, out: ``
- create / log into your account on dockerhub
- create a new Access Token
- log in on the command line with your usernamne and the access token as your password:
docker login
- if you get an error like this:
- start all services with The One Command:
make up
- stop all services with The (Other) One Command:
make down
- for managing and accessing services individually, continue reading below
- access the mongo command line on the running container:
docker exec -it lotr-mongo-1 mongosh test> use lotr lotr>
- the database files are stored in
./docker/db/
- to restore from the original, stop the running containers, delete that directory, and bring the environment back up:make down sudo rm -rf ./docker/db make up
- to manage node packages, run the CLI:
make cli user@abc123:/app$ cd backend user@abc123:/app/backend$ npm outdated
- if you want to watch the nodemon output as changes are made to application files, follow the container logs:
docker container logs -f lotr-backend-1
- to manage node packages, run the CLI:
make cli user@abc123:/app$ cd frontend user@abc123:/app/frontend$ npm outdated
- if you want to watch the webpack output as changes are made to application files, follow the container logs:
docker container logs -f lotr-frontend-1
- navigate to http://localhost:3000 and sign up
- use your favorite Mongo client to access user documents and get your new access_token for using the secured APIs
- OR login with your credentials in the Frontend to get your token
- run the CLI, navigate to the specific project (backend or frontend), and execute
npm test
:make cli user@abc123:/app$ cd backend user@abc123:/app/backend$ npm test
The API data is far from perfect: There might be spelling mistakes, duplicates, wrong or missing data. You are very welcome to fix data to be included in the next release!
-
Option 1
- 🍴 Fork this repo!
-
Option 2
- 👯 Clone this repo to your local machine using
https://github.com/gitfrosh/lotr-api.git
- 👯 Clone this repo to your local machine using
-
move into the database folder
cd db/csv
-
make your improvements in one of the data CSV files
-
🔃 Create a new pull request using
https://github.com/gitfrosh/lotr-api/compare
.