Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
redis-in-docker
Advanced tools
Module starts redis server inside docker container. This is helpful while testing.
NOTE: Docker required.
npm i redis-in-docker --save
interface IRedisInDockerOptions {
// use redis v4, by default v5 is used [optional]
redisV4?: boolean;
// if true, all actions will be logged to console, default is false [optional]
verbose?: boolean;
// if specified, then it will be used to store redis database after shutdown
// note: should be accessible by docker
storage?: string;
}
Constructor
Starts docker container with redis server.
If succeeded, then port
, host
, etc. properties become available.
Stops running docker container.
After completion all port
, host
, etc. properties become unavailable.
Returns redis client.
Returns domain or ip of running redis server.
Returns port redis server is listening to.
const RedisContainer = require('redis-in-docker');
async function main() {
const options = {
// See IRedisInDockerOptions
};
// instantiate
const container = new RedisContainer(options);
// boot
await container.start();
const port = container.port;
const host = container.host;
// do some work
...
// shutdown
await container.stop();
}
or if you want to use storage:
const RedisContainer = require('redis-in-docker');
async function main() {
const options = {
// See IRedisInDockerOptions
storage: '/my-path'
};
// instantiate
const container = new RedisContainer(options);
// boot
await container.start();
const port = container.port;
const host = container.host;
// do some work
...
// shutdown
await container.stop();
// Restore after some from the same storage
await container.start();
// Work with restored database
...
// shutdown again
await container.stop();
}
MIT. See LICENSE
Siarhei Ladzeika sergey.ladeiko@gmail.com
FAQs
## Purpose
The npm package redis-in-docker receives a total of 1 weekly downloads. As such, redis-in-docker popularity was classified as not popular.
We found that redis-in-docker 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.