Skip to content

amrtgaber/aoe2-data-api

Repository files navigation

AoE2 Data Api

Description

Api for getting data bout Age of Empires II game civilizations, ages, units, techs, and buildings.

Docs

Api documentation is hosted at https://aoe2-data-api.herokuapp.com/docs provided by NestJS and Swagger.

To see the docs during development run the project and navigate to localhost:4000/docs.

Prerequisites

  • node (preferably through nvm)
  • docker (for dev db only)

Installation

$ npm install

Running the app

Start the appropriate docker container before running the API. Then run one of the commands below.

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# test coverage
$ npm run test:cov

Updating database

Seed data is generated through a fork of the aoe2techtree project.

https://github.com/amrtgaber/aoe2techtree

The scripts are in the data-conversion folder.

After running the scripts successfully, copy the files into prisma/seed-data to replace the files with the same names.

Update the game version in prisma/seed.ts.

License

MIT licensed.


Age of Empires II © Microsoft Corporation. Age of Empires II Data Api was created under Microsoft's "Game Content Usage Rules" using assets from Age of Empires II and it is not endorsed by or affiliated with Microsoft.