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.
npm install
PORT=<your_expected_port> npm run dev
Usage
http://localhost:<your_expected_port>