Skip to content

Latest commit

 

History

History
43 lines (22 loc) · 2.63 KB

README.md

File metadata and controls

43 lines (22 loc) · 2.63 KB

Sample WoW Signature Generator - Node.js

This application serves as an example node.js application for consuming OAuth APIs exposed for World of Warcraft. The app leverages the Client Credentials flow to retrieve an OAuth token and then generate a PNG image for a given character.

Example Output

http://localhost:3000/signature?region=us&realmName=tichondrius&characterName=tmpikaboo

Image of example generated image

API Usage

In accordance with the World of Warcraft Community API Migration this application leverages only the WoW Game Data APIs.

Getting Started

To get started experimenting with this application, you will first need to follow the getting started guide to create a new OAuth client on develop.battle.net.

Configuration

Once you have created your OAuth client on develop.battle.net, copy the .env.example file to .env, and fill in the values for the CLIENT_ID and CLIENT_SECRET variables. The values from the .env file will be loaded by the dotenv library at startup.

ImageMagick

This application leverages ImageMagic abstracted through the gm node module to manipulate and produce the image output files.

Depending on which platform you are developing on, you may be required to install ImageMagic on your system before you can successfully run and invoke the application.

Docker Support

To simplify the ImageMagick dependency described above, this application is also set up to run in a docker container with an existing docker-compose file already written for convenience.

You can run the application easily by invoking the docker-compose -f docker-compose.yml up command in a command-line shell, granted that you already have Docker installed on your system.

Development

Should you wish to experiment with this code and make changes, the application is setup to work with nodemon to watch the filesystem and restart anytime a .js file is changed. This functionality is enabled by default when running with the above docker-compose command.

Deploy to Heroku

Additionally, this application is compatible with deploying on a free Heroku Account.

Deploy