== This rylyz service provides: o The rylyz wyjyt.js [http://[RYLYZ_PLAYER_HOST]/assets/rylyz.wyjyt.js] o The Socket Services (Pusher) that the wyjyt uses o The rylyz javascript rendering framework o The rylyz rails real-time game development framework o An example blog page showing a usage of wyjyt.js [http://rylyz-holodeck.herokuapp.com/blogger/blog] == To start the service locally on port 80 /etc/hosts: add the following 2 lines for development: 127.0.0.1 rylyz-local.ws 127.0.0.1 rylyz-local.com 127.0.0.1 wygyt.rylyz-local.ws start the server with: --> $ sudo apachectl stop --> $ rbenvsudo rails s -p80 Running on port 80 leverages the benefits of websockets When running locally, turn off your default webserver, (Make sure rails is running in development to engage asset pipeline) == Start MongoDB mongod run --config /usr/local/Cellar/mongodb/2.0.3-x86_64/mongod.conf == Pusher APP ID configure pushher app ids in config/environments/xxx.rb Keep in mind that this server will launch listeners - If you start a server in heroku, one in EC2, and one on your local box, then all 3 servers will be listenting and responding to the same pusher events. To avoid this ambiguity - start the server in a unique RAILS_ENV, Optionally, register and get your own Pusher APP ID, and create a personal RAILS_ENV for your own development by copying development.rb and updating the pusher App ID, key and secret == When deploying for stage or production Optionally turn off real time sockets (when deploying only parts of the app, like the dashboard): heroku config:add REAL_TIME=off By default, real time sockets are turned on. RYLYZ_PLAYER_HOST must be set in order to pick up the correct production configs: rylyz.ws picks up production configs dashboard.rylyz.ws also uses production configs and points to the same db (REAL_TIME is turned off in heroku configs) any RYLYZ_PLAYER_HOST with rylyz.ws will pick up production configs (live keys, secrets and credit card transactions) (for different heroku apps to point to the same database, set the db url the same in heroku configs) any RYLYZ_PLAYER_HOST with 'holodeck' uses the staging environment any RYLYZ_PLAYER_HOST with 'player' uses the dev environment When deploying to my-app-name.herokuapp.com simply set HEROKU_APP_NAME > heroku config:add HEROKU_APP_NAME=my-app-name and RYLYZ_PLAYER_HOST will automatically be set to my-app-name.herokuapp.com Otherwise, when deploying to myhost.com set RYLYZ_PLAYER_HOST (either on heroku or elsewhere0) > heroku config:add RYLYZ_PLAYER_HOST=myhost.com