diff --git a/installandrun.sh b/installandrun.sh index 5448595..2ddd5ec 100644 --- a/installandrun.sh +++ b/installandrun.sh @@ -4,6 +4,7 @@ npm install hapi npm install express npm install restify npm install koa +npm install bluebird npm install n npm install total.js n install latest @@ -38,4 +39,4 @@ sleep 5 echo total.js >> results.txt ; node totalserver/total.js & sleep 5 ; ab -k -n 50000 -c 100 -t 20 http://127.0.0.1:8000/ | grep "Requests per second:" >> results.txt ; pkill -f total ; -sleep 5 \ No newline at end of file +sleep 5 diff --git a/koaserver.js b/koaserver.js index 5d42e0f..3b7a63c 100644 --- a/koaserver.js +++ b/koaserver.js @@ -1,3 +1,4 @@ +global.Promise = require('bluebird'); var koa = require('koa'); var app = koa(); @@ -6,4 +7,4 @@ app.use(function *(){ this.body = 'Hello World!'; }); -app.listen(8000); \ No newline at end of file +app.listen(8000);