This repository contains a simple web application built with Go that serves a World of Warcraft (WoW) model viewer. The application allows users to view WoW character models and item models using embedded templates and static resources.
- Character model viewer with customizable race, gender, and hairstyle options.
- Item model viewer that displays WoW items based on their display ID.
- Tailwind CSS and jQuery for UI styling and interactivity.
- Wowhead Model Viewer integration to display WoW models in 3D.
The following environment variables can be set to customize the app's behavior:
PORT
: The port on which the app will run (default: 8080).
-
Clone this repository:
git clone https://github.com/your-username/wow-model-viewer.git cd wow-model-viewer
-
Install dependencies:
go mod download
-
Serve the application:
go run main.go
-
Open your browser and navigate to
http://localhost:8080
.
To build and run the application locally using Docker, follow these steps:
-
Build the Docker image:
docker build -t wow-model-viewer .
-
Run the container:
docker run -p 8080:8080 --env PORT=8080 --env FLY_REGION=local wow-model-viewer
-
Open your browser and navigate to
http://localhost:8080
.
Serves the main page where users can view and customize character models and item models.
- Method: GET
- Query Param:
item
(required) - Looks up an item by its ID and returns the display ID in JSON format.
- Method: GET
- Returns a JSON object of available WoW races with their corresponding race IDs.
- Method: GET
- Simulates an internal server error.
Static resources such as images or JavaScript files are served from the /static
directory.
HTML templates are embedded in the Go binary using the embed
package and located under the templates/
directory.
- Visit
http://localhost:8080
. - Customize your character by selecting a race, gender, and hairstyle.
- View a 3D model of an item by selecting one from the dropdown in the item viewer.
This project is licensed under the MIT License. See the LICENSE file for details.