/heisenslaught

Primary LanguageC#MIT LicenseMIT

Heisenslaught

A custom drafting tool for (On|Off|Cole)slaught.

Local Setup

  1. Install node
  2. Install mongodb

App Configuration

  1. Copy src/Heisenslaught/appsettings.json to /opt/Heisenslaught/appsettings.json

  2. Changes the values of ClientID and ClientSecret to match your battle.net application - Create Here

  3. Add any battleTags you wish to make super users to AutoGrantSuperUserToBattleTags - they will be added to the SU role the first time they log in

    Example appsettings.json:

    {
      "MongoDb": {
    	"ConnectionString": "mongodb://localhost:27017",
    	"Database": "Heisenslaught"
      },
      "Authentication": {
    	"BattleNet": {
    	  "ClientID": "HAN76GhJ87Jhgs",
    	  "ClientSecret":  "MHHVS8s6b66dhs7dj"
    	}
      },
      "UserCreation": {
    	"AutoGrantSuperUserToBattleTags": [
    		"John#1234",
    		"SuperAwsome#9876"
    	]
      }
    }

SSL Configuration

  1. Instructions coming soon(tm)

UI

  1. In src/HeisenslaughtUI run npm install
    1. Note there is currently a bug in the version of node-sass used by angular-cli. After npm install you need to run npm rebuild node-sass to generate the vendor folder needed.
  2. In src/HeisenslaughtUI run ./node_modules/bin/ng.cmd build (Windows) or ./node_modules/.bin/ng build (OS X / Linux)
    1. Alternatively you can install angular cli globally and just run ng build

Please complete these steps before running the server

Windows Server

  1. Install Visual Studio 2017
    1. Select the following Workloads when installing
      1. Web Development
      2. .NET Core and Docker (Preview)
  2. Setup static file compilation
    1. In src/Heisenslaught run npm install
    2. Open Heisenslaught.sln
  3. Press F5 to launch the application

OS X / Linux Server

  1. If you are upgrading from a previous version of dotnet you may need to remove your previous version. Helpful scripts can be found here.
  2. Install Preview 3 (or later)
  3. Run dotnet restore
  4. In src/Heisenslaught run ASPNETCORE_ENVIRONMENT=Development dotnet run

If you are on Arch Linux then you can figure it out yourself :) (or wait until this is updated).

Deployment

Please refer to ops/Readme.md.