karellodewijk / wottactics

Wot tactic planner for CW
MIT License
28 stars 34 forks source link

wot tactics

Hi, visit the page at www.wottactic.eu for this code in action..

The interesting parts of this project are the server ("app.js") and the clientside javascript that makes the editor tick, ("public/javascripts/planner.js").

To get started quickly on both windows and linux:

use wottactics

db.createUser( { user: "username", pwd: "password", roles: [ "readWrite", "dbAdmin" ] } )

Login options:

For wg login you need to fill in a valid WG api key, doesn't matter which region

If you want facebook/google/twitter/battlesnet/vk/steam login to work, you need to fill in the "secrets.txt" files with secrets/ids generated when you register the app at their respecive services.

Also for facebook/google/battlesnet/vk you'll need to whitelist the redirect uri's: http://hostname/auth/facebook/callback, http://hostname/auth/google/callback, http://hostname/auth/vk/callback, http://hostname/auth/battlenet/callback.

Other optional options:

static_host: This is for using a CDN. Upload the contents of the public map to your cdn and fill in a the full url here e.g.: "static_host": "http://server/public". Clients will now prefer to load all statics files (icons/js/stylesheets/maps) from that address.

ga_id: Your google analytics unique id if you want to enable google analytics tracking.

socket_io_servers: If you run more than 1 instance of the node app it should contain a comma seperated list of public ips/hostnames that should be identical for each instance. When connecting to a tactic it will select a server to connect to based on the a hash of the room id. e.g.: "server1.myhost.com, server2.myhost.com" or even "myhost.com:3000, myhost.com:3001" when running multiple instances on the same host.

Caveats:

Use the stable/lts node releases (v6) of node.

If you are doing some reverse proxy/port redirection wizardry with nginx for example, make sure it properly handles websockets.