1.0.4 • Published 6 months ago

@rampagecorp/redis v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

RAMPAGE-Redis-NodeJS

Interact with Redis 7 on your RAMPAGE.Host server.

Rent a server today: https://rampagecloud.com/store/game-hosting

Code Example

const RedisClient = require("@rampagecorp/redis");
const redisHost = "region.shared.rampage.host";
const redisPort = 3000;
const redisPassword = process.env.redisPassword;
const redisClient = new RedisClient(redisHost, redisPort, redisPassword);

try {
  // Set a key-value pair
  redisClient.set("example_key", "example_value");

  // Get the value by key
  const value = await redisClient.get("example_key");
  console.log(`Value for 'example_key': ${value}`);

  // Delete a key
  redisClient.delete("example_key");

  // Close the connection
  redisClient.close();
} catch (error) {
  console.error(`Error: ${error.message}`);
}
1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago