anfordern

0.0.4 • Public • Published

ANDFORDERN

A tool to stress test http/https protocols

USING

To use this, you must first create a new object and call a method. Suggest using the flag --max_old_space_size=<size> to increase the amount of ram your APP can use.

Creating
const Anfordern = require('anfordern');

let anfordern = new Anfordern({
    url: "your URL",   // must be a string with a valid protocol
    timer: 1000, // must be a number in ms
    headers: { key: "value" }
});
Methods
Method Arguments returns Description
.start() function(err, data) err if an error occurs
data what the server sends back
Starts sending requests at set interval
.cluster() function(err, pid, data) err if an error occurs
pid the process id of our worker
data what the server sends back
Clusters the app and send more than one request at each interval

Example

const Anfordern = require('anfordern');

let anfordern = new Anfordern({
    url: process.env.URL,
    timer: 1000
});

anfordern.cluster(function(err, pid, data) {
    if(err) console.log(pid, err);
    console.log(data);
})
DISCLAIMER:

Do not use this tool for anything that might be considered questionable. I am not responsible for how this tool is used. Use this only on your own hardware.

Package Sidebar

Install

npm i anfordern

Weekly Downloads

8

Version

0.0.4

License

MIT

Last publish

Collaborators

  • idietmoran