Client to access mongoDB data store

Usage no npm install needed!

<script type="module">
  import vartanovsMongoClient from 'https://cdn.skypack.dev/@vartanovs/mongo-client';


MongoDB Client

This package contains a client to access a mongoDB data store.


_$ npm install @vartanovs/mongo-client

Basic Usage

import * as MongoClient from '@vartanovs/redis-client';

const mongoConfig = {
  host: process.env.MONGO_HOST,
  password: process.env.MONGO_PASSWORD,
  port: Number(process.env.MONGO_PORT),
  user: process.env.MONGO_USER,

const mongoClient = new MongoClient(mongoConfig);

// Set, get and delete a string value using a unique key
await redisClient.set('key', 'value');
const val = await redisClient.get('key');
await redisClient.delete('key');

// Increment a counter
await redisClient.increment('counterKey'); // Increment by 1
await redisClient.increment('counterKey', 5); // Increment by 5