Code Monkey home page Code Monkey logo

server's Introduction

WoWAnalyzer.com server

WoWAnalyzer is a tool to help you analyze and improve your World of Warcraft raiding performance through various relevant metrics and gameplay suggestions.

https://wowanalyzer.com

This repo containers the server hosting WoWAnalyzer.com. It does not include any analysis code, that can be found on the main repository. This houses our internal API and login mechanisms, such as WCL and Battle.net API proxies and caches.

Development environment

Configuration

This is needed for both options. Copy .env.local.example (name it .env.local) and configure the API keys you're going to need. You don't need to configure everything.

Note if you change something in the .env files you may need to restart your development server if it's already running.

Standard (recommended)

Database

A database server is required to run the server.

If you have something running already, just configure it in the .env.local. If you're not using MariaDB, you will need to install one of the following dependencies and configure the MYSQL_DIALECT accordingly in the .env.local file:

npm install --no-save pg pg-hstore # Postgres
npm install --no-save mysql2
npm install --no-save mariadb
npm install --no-save sqlite3
npm install --no-save tedious # Microsoft SQL Server

Otherwise either run docker-compose up -d database to start a Docker database (recommended) or install MariaDB.

Dev server

  1. Install dependencies: yarn
  2. Fire her up: yarn start

Now the development server is available at http://localhost:3001. It will recompile automatically but not refresh.

Installing new dependencies

  • yarn add new-dependency for a production dependency
  • yarn add -D new-dependency for a development dependency

Docker

  1. docker-compose up

Now the development server is available at http://localhost:3001. It will recompile automatically but not refresh.

Watching output

docker-compose logs -f server

Installing new dependencies

Either:

  • Add it to package.json and run docker-compose up --build -d
  • docker-compose exec server yarn add new-dependency

Combining with the SPA dev server

See the main repository for instructions on how to start the SPA development server. For the max development pleasure, run the SPA development like normally and change the server it uses to your server path. In the SPA root make a .env.development.local and add the line: REACT_APP_SERVER_BASE=http://localhost:3001/. Restart the SPA development server and it will now use your own server for API calls.

Alternaitvely if you want to test the proxy, you should use the standard environment. It will proxy the SPA development server by default. The Docker environment seems to be unable to connect to your SPA development server.

Production environment

  1. docker build --tag wowanalyzer-server .
  2. docker run wowanalyzer-server

Now the production server is available at http://localhost:3001.

server's People

Contributors

martijnhols avatar dependabot[bot] avatar emallson avatar pewtro avatar cheezburgirl avatar jander99 avatar scottymcraig avatar warcraftyax avatar testaccount9393 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.