Serverless API for collectionlog.net and the collection log Runelite plugin
Clone the respository and install dependiencies
$ git clone https://github.com/evansloan/collection-log-api && cd collection-log-api
$ yarn install
- Create .env file
Rename .env.docker
to .env
. The variables in this file can be modified to your liking
- Build and start the Docker container
$ docker-compose up
- Apply database migrations
$ docker-compose exec api yarn run migrate:latest
- Run database seeders (optional)
$ docker-compose exec api yarn run seed
- Connect to the database and API
Database connection string: postgres://postgres:postgres@localhost:5433/collection_log
API base URL: http://localhost:3001/
-
Install PostgreSQL
-
Set up
collection_log
database and user
$ createuser <username>
$ createdb collection_log
$ psql
$ ALTER USER <username> WITH encrypted password '<password>'
$ GRANT ALL PRIVILEGES ON DATABASE collection_log TO <username>
- Create .env file
Rename .env.sample
to .env
and set the following variables
DB_USER=<username>
DB_PASS=<password>
- Apply database migrations
$ yarn run migrate:latest
- Run database seeders (optional)
$ yarn run seed
- Run the API
yarn run dev
- Connect to the database and API
Database connection string: postgres://postgres:postgres@localhost:5433/collection_log
API base URL: http://localhost:3001/