8000 GitHub - MegaMek/api-data: API Access to MM Data
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MegaMek/api-data

Repository files navigation

BattleTech API

A public access API for access to various bits of BattleTech data sourced from MegaMek data.

Dev Database

For local development, a docker version of Postgres should be used to allow for the most portability. One can be created with the following command:

docker run --name api-battletech \
  -e POSTGRES_DB=api-battletech \
  -e POSTGRES_USER=vapor \
  -e POSTGRES_PASSWORD=password \
  -p 5432:5432 -d postgres:latest

To run:

swift build
swift run App migrate -y
swift run App serve

Testing Database

For testing, use the following to load a docker instance:

docker run --name api-battletech-test \
  -e POSTGRES_DB=api-battletech \
  -e POSTGRES_USER=vapor \
  -e POSTGRES_PASSWORD=password \
  -p 5433:5432 -d postgres:latest

We use a different port to allow both to run at the same time.

swift test --enable-code-coverage

About

API Access to MM Data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0