Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge remote branch 'mkrecny/deps'

  • Loading branch information...
commit f580f2f4c85c080b2906561a227044e4e3ce6dcd 2 parents 4e173ba + 4b32ddc
@sork sork authored
View
1  .gitignore
@@ -5,3 +5,4 @@ config_build.json
config_local*
client/audio/music
.DS_Store
+*.swp
View
14 package.json
@@ -0,0 +1,14 @@
+{
+ "name": "BrowserQuest"
+ , "version": "0.0.1"
+ , "private": false
+ , "dependencies": {
+ "underscore": ">0"
+ , "log": ">0"
+ , "bison": ">0"
+ , "websocket": ">0"
+ , "websocket-server": ">0"
+ , "sanitizer": ">0"
+ , "memcache": ">0"
+ }
+}
View
5 server/README.md
@@ -9,8 +9,9 @@ The game server currently runs on nodejs v0.4.7 (but should run fine on the late
- websocket
- websocket-server
- sanitizer
+- memcache
-All of them can be installed via `npm install [module_name]`
+All of them can be installed via `npm install -d` (this will install a local copy of all the dependencies in the node_modules directory)
Configuration
@@ -38,4 +39,4 @@ The server has a status URL which can be used as a health check or simply as a w
Send a GET request to: `http://[host]:[port]/status`
-It will return a JSON array containing the number of players in all instanced worlds on this game server.
+It will return a JSON array containing the number of players in all instanced worlds on this game server.
View
2  server/js/main.js
@@ -13,7 +13,7 @@ function main(config) {
worlds = [],
lastTotalPlayers = 0,
checkPopulationInterval = setInterval(function() {
- if(metrics.isReady) {
+ if(metrics && metrics.isReady) {
metrics.getTotalPlayers(function(totalPlayers) {
if(totalPlayers !== lastTotalPlayers) {
lastTotalPlayers = totalPlayers;
Please sign in to comment.
Something went wrong with that request. Please try again.