Protect your node client for as long as possible. Defend against waves of murderous server side code that wants nothing more than to kill and disconnect your node client.
npm install node-defender
|5||downloads in the last month|
|Version||0.0.8 last updated 4 months ago|
|Dependencies (8)||connect-mongo, express, jade, underscore, passport, passport-twitter, passport-username, newrelic|
Defend against waves of murderous server side code that wants nothing more than to kill and disconnect your node client.
Running the game
- Define the host location of the game server and run npm start as follows:
HOST=<server host> npm start
Playing the game
To defend your node, you will need to implement a strategy against the waves of enemies that will attack you. A sample strategy has been provided to make you familiar with the available API to the server.
To begin, login and edit the code in the code editor and devise your strategy to last as long as possible against the onslaught.
- The code is wrapped in a method that is called once per round and passed the following variables:
roundInfoobject contains methods for getting information about the round, such as a list of mobs.
commanderis where you will define what enemy to attack and what attack mode you want to use.
- Click "Start Game"
Information on the Game
Consult The Client Wiki for more information on the attack modes and mob types.
All the below configurations are optional.
HOST- Node Defender Game server to connect.
PORT- Port of the client application. Default to 8081.
1to force HTTPS only. Default to false.
SECURECLIENTURL- Url when HTTPS only is on.
SESSION_SECRET- Secret code for session encryption.
SESSION_KEY- Cookie name for the session.
TWITTER_CONSUMER_KEY- OAuth app key. If not defined, twitter oauth will redirect to home page.
TWITTER_CONSUMER_SECRET- OAuth app secret. If not dfeined, twitter oauth will redirect to home page.
MONGO_DSN- Mongo connector used for session storage in the form of
mongodb://user:password@host/db/collection. If not specified will fallback to node sessions storage.
GA_ACCOUNT- Google Analytics account code.