shakil-shahan / MongoDB-TTL

MongoDB's TTL (Time To Live) fully implemented with NodeJS and Express.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MongoDB-TTL

MongoDB's TTL (Time To Live) fully implemented with NodeJS and Express.

Overview

MongoDB is one of the widely used NoSQL database. Sometimes we need to automatically remove documents from a collection after a certain amount of time or at a specific clock time. So here I show how to implement easily TTL indexes and configure it on demand with calling just a single API.

Environment Variables

Create a .env file based on .env-example file.

Installation & Local Run

Ensure you have node 10 or higher.

  1. npm install
  2. PORT=<your_expected_port> npm run dev

Usage

http://localhost:<your_expected_port>


Thank you

About

MongoDB's TTL (Time To Live) fully implemented with NodeJS and Express.


Languages

Language:JavaScript 100.0%