diff --git a/server.js b/server.js index b10ed1d..082f7a3 100644 --- a/server.js +++ b/server.js @@ -2,6 +2,7 @@ var http = require('http'); var express = require('express'); var jade = require('jade'); var pg = require('pg'); +var ip = require('ip'); var favicon = require('serve-favicon'); @@ -104,7 +105,7 @@ app.use(function(req, res) { var serverPort, serverIpAddress; if ( isDev ) { serverPort = 4000; - serverIpAddress = 'localhost'; + serverIpAddress = ip.address(); } else { // Openhift conf serverPort = process.env.OPENSHIFT_NODEJS_PORT || 8080; diff --git a/utils/load/load.js b/utils/load/load.js index 9ab608a..e586cb0 100644 --- a/utils/load/load.js +++ b/utils/load/load.js @@ -44,9 +44,15 @@ function addLevel(i) { // }, true); this.thenOpen(baseUrl + 'prototype/tutorial'); - this.thenOpen(baseUrl + 'prototype/play'); - this.thenOpen(baseUrl + 'prototype/play'); - this.thenOpen(baseUrl + 'prototype/play'); + this.wait(1000, function() { + this.thenOpen(baseUrl + 'prototype/play'); + this.wait(1000, function() { + this.thenOpen(baseUrl + 'prototype/play'); + this.wait(1000, function() { + this.thenOpen(baseUrl + 'prototype/play'); + }); + }); + }); this.thenOpen(baseUrl + 'logout'); diff --git a/utils/load/load.sh b/utils/load/load.sh index 0f52537..eb0566a 100755 --- a/utils/load/load.sh +++ b/utils/load/load.sh @@ -1,5 +1,5 @@ #!/usr/bin/bash rm -f cookies* -for i in `seq 1 8`; do +for i in `seq 1 30`; do casperjs load.js --cookies-file=cookies"$i".txt& done