Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
redis-on-workers
Advanced tools
Readme
Connect to your Redis server using cloudflare:sockets
.
This package is designed to work with Cloudflare Workers, but it can also be used in node.js thanks to the implementation of cloudflare:sockets
for node.js.
npm install redis-on-workers
This is the minimal example to connect to a Redis server.
import { createRedis } from "redis-on-workers";
const redis = createRedis({
url: "redis://<username>:<password>@<host>:<port>",
});
await redis("SET", "foo", "bar");
const value = await redis("GET", "foo");
console.log(value); // bar
This is useful if you want to store binary data. For example, you can store protobuf messages in Redis.
import { createRedis } from "redis-on-workers";
const redis = createRedis({
url: "redis://<username>:<password>@<host>:<port>",
});
await redis.raw("SET", "foo", "bar");
const value = await redis.raw("GET", "foo");
const decoder = new TextDecoder();
console.log(decoder.decode(value)); // bar
Please install the node.js polyfill for cloudflare:sockets
to use this package in node.js.
npm install @arrowood.dev/socket
createRedis(options: RedisOptions): Redis
Create a new Redis client, does NOT connect to the server yet, the connection will be established when the first command is sent.
RedisOptions
url
(string): The URL of the Redis server.tls
(boolean): Whether to use TLS. Default: false
.logger
(function): A function to log debug messages.connectFn
(function): Polyfill for cloudflare:sockets
's connect
function if you're using it in node.js. Default: undefined
.FAQs
Connect to your Redis server using cloudflare:sockets
The npm package redis-on-workers receives a total of 2 weekly downloads. As such, redis-on-workers popularity was classified as not popular.
We found that redis-on-workers demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.