Skip to content

Instantly share code, notes, and snippets.

@rphillips
Last active August 29, 2015 14:23
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 rphillips/14f4e8e4e096be101542 to your computer and use it in GitHub Desktop.
Save rphillips/14f4e8e4e096be101542 to your computer and use it in GitHub Desktop.
siege -b -c1 -r100 https://127.0.0.1:8080
local https = require('https')
local fs = require('fs')
local options = {
key = fs.readFileSync('server.key.insecure'),
cert = fs.readFileSync('server.crt')
}
local server = https.createServer(options, function(req, res)
print('here')
res:write('hello world\n')
res:finish()
end)
server:listen(8080, '127.0.0.1')
$ siege -b -c1 -r100 https://127.0.0.1:8080
** SIEGE 3.0.9
** Preparing 1 concurrent users for battle.
The server is now under siege...
HTTP/1.1 200 0.04 secs: 12 bytes ==> GET /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment