diff --git a/hapiserver.js b/hapiserver.js index ee3015e..d078694 100644 --- a/hapiserver.js +++ b/hapiserver.js @@ -3,8 +3,7 @@ const Hapi = require('hapi'); // Create a server with a host and port -const server = new Hapi.Server(); -server.connection({ +const server = new Hapi.Server({ host: 'localhost', port: 8000 }); diff --git a/install.sh b/install.sh index e5b7bc5..8055885 100644 --- a/install.sh +++ b/install.sh @@ -1,5 +1,5 @@ -apt-get install apache2-utils -apt-get install npm +apt-get install apache2-utils -y +apt-get install npm -y npm install n -g n latest npm install hapi @@ -11,9 +11,12 @@ npm install n npm install total.js npm install adonis-cli -g adonis new yardstick +cd ./yardstick +npm install +cd .. cp yardstick-changes/app/Http/kernel.js yardstick/app/Http/kernel.js cp yardstick-changes/app/Http/routes.js yardstick/app/Http/routes.js npm install sails -g -sails new test-project +sails new test-project --minimal cp test-project-changes/api/controllers/ApiController.js test-project/api/controllers/ApiController.js -cp test-project-changes/config/routes.js test-project/config/routes.js \ No newline at end of file +cp test-project-changes/config/routes.js test-project/config/routes.js diff --git a/run.sh b/run.sh index c8124c4..e3a1734 100644 --- a/run.sh +++ b/run.sh @@ -45,8 +45,8 @@ sleep 5 echo adonis.js >> results.txt ; cd yardstick ; -npm start run & sleep 5 ; +npm run serve & sleep 5 ; cd ..; ab -k -n 50000 -c 100 -t 20 http://127.0.0.1:3333/ | grep "Requests per second:" >> results.txt ; pkill -f server.js ; -sleep 5 \ No newline at end of file +sleep 5