Offline development - WoWAnalyzer/WoWAnalyzer GitHub Wiki

1

Launch your database server. The easiest way to do this is using Docker:

docker-compose up -d database

Alternatively you can install MariaDB or MySQL locally, but that's more messy. If you already have a compatible database installed locally that can work too. Still messy.

2

Make a database named wowanalyzer.

3

Go to the server/ directory in your repository root. Add a .env.local file with the following content:

PORT=3001
MYSQL_PORT=4306
MYSQL_ROOT_PASSWORD=your-database-pw
# Get it here: https://www.warcraftlogs.com/profile
WCL_API_KEY=your-wcl-api-key
# Get it here: https://develop.battle.net/access/clients
BATTLE_NET_API_CLIENT_ID=your-battlenet-client-id
BATTLE_NET_API_CLIENT_SECRET=your-battlenet-client-secret

We change the port so we can have the front-end dev server running at the same time.

4

Make a .env.development.local in your repository root (NOT the server directory) with the following content:

# Get it here: https://www.warcraftlogs.com/profile
REACT_APP_WCL_API_KEY=your-wcl-api-key
REACT_APP_SERVER_BASE=http://localhost:3001/

5

Fire up the dev servers by calling the npm start command in both the repository root and the server directory.

You can develop like normally on http://localhost:3000/. Any API calls will be sent to your local development server instead of our API. Open a report. After loading initially, it will now be cached indefinitely.