Skip to content

artyom-podymov/node-scripts-for-redis

 
 

Repository files navigation

Scripts for Redis Database

Description

Scripts for Redis Database

Prerequisites

Make sure you have installed following packages:

Getting started

Installation

$ npm install

Scripts configuration

Each script has its own config object inside the config.js file

const DB_CONFIG = {
  host: 'localhost',
  port: 7001,
  password: '',
}

const POPULATE_DB_WITH_ZSETS_СONFIG = {
  keyNameStartWith: 'key',
  count: 10,
}

...

Running the scripts

# Add strings to the database
$ node populate-db-with-strings.js

# Add zsets to the database
$ node populate-db-with-zsets.js

# Add sets to the database
$ node populate-db-with-sets.js

# Populate set with members
$ node populate-set-with-members.js

# Add hashes to the database
$ node populate-db-with-hashes.js

# Populate hash with fields
$ node populate-hash-with-fields.js

# Add lists to the database
$ node populate-db-with-lists.js

# Add jsons to the database
$ node populate-db-with-jsons.js

# Populate zset with members
$ node populate-zset-with-members.js

# Populate list with elements
$ node populate-list-with-elements.js

# Delete all the keys of all the existing databases
$ node flush-db.js

# Delete multiple keys from the selected database
$ delete-keys-from-db.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 53.8%
  • TypeScript 40.6%
  • Python 5.6%