http = require 'http'
querystring = require 'querystring'
url = require 'url'
+console.log "required builtins"
less = require 'less'
+console.log "required less"
coffee = require 'coffee-script'
+console.log "required coffee-script"
model = require './common.coffee'
+console.log "required common.coffee"
games = {}
max_concurrent_games = 50
return html_handler url_parts.query, res, req, url_parts
################## INIT ####################
-# nodester starts this app with the current working directory set to / and working copy in /app
-if process.cwd() is '/'
- process.chdir '/app'
+# make sure the current working directory is correct
+process.chdir __dirname
setInterval expire_old_games, 2 * 60 * 1000 # check every 2 minutes for expired games