Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Simple tool for HTTP response simulation, automated and load testing.
When started, server parses query string of incoming requests and responds with simulated latency, status code, JSON payload or any combination of the mentioned above.
npm install simdummy
To simulate echo headers response with approximately 200 ms latency, start the server:
const SimServer = require('simdummy')
const server = new SimServer().start()
Make HTTP call with simulation settings:
time curl http://localhost:9999/?l=200\&n=50\&eh=1
Available query string parameters:
const SimServer = require('simdummy')
// set latency and response body size limits
const limits = { maxLatency: 500, maxBodySize: 16 * 1024 }
const server = new SimServer(limits)
server.start(s =>
// execute code on start
console.log(`Simulation server started at ${s.address().port}`),
// set custom port
9999
)
// request event is emited after settings parsed and limits applied
server.on('request', (req, res, settings) => {
console.log('Simulating response')
// override response latency
setting.latency.actual = 1000
// override response body
settings.response.body = 'Hello, world!'
// or end response right here
res.end()
})
// stop the server
server.close(err => {
// execute code on stop
console.log('Simulation server stopped')
})
To start simdummy in Docker container do:
docker run --name sd -p 9999:9999 -d alexpereverzyev/simdummy:0.1.1
FAQs
Simple tool for HTTP response simulation, automated and load testing
The npm package simdummy receives a total of 0 weekly downloads. As such, simdummy popularity was classified as not popular.
We found that simdummy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.