Skip to content

Instantly share code, notes, and snippets.

@hassy
Created February 2, 2016 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hassy/ed9fe0b2fff766a6fd96 to your computer and use it in GitHub Desktop.
Save hassy/ed9fe0b2fff766a6fd96 to your computer and use it in GitHub Desktop.
node server.js
# npm install artillery
./node_modules/.bin/artillery run large_payload.json
var Hapi = require('hapi');
var PORT = 3003;
var server = new Hapi.Server();
server.connection({
host: '0.0.0.0',
port: PORT
});
server.route({
method: 'POST',
path: '/',
handler: f
});
server.start(function() {
console.log('Target listening on 0.0.0.0:' + PORT);
});
function f(req, reply) {
reply('ok');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment