Skip to content

emanuelefavero/mongo-connect-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MongoDB Connect Script

This Node.js script is used to establish a connection to a MongoDB database. It can be useful to prevent the database from pausing due to inactivity.

Installation

  1. Clone the repository
  2. Run npm install to install the dependencies
  3. Create a .env file in the root directory and add the following environment variables:
    • MONGO_URI: The URI of the MongoDB database
  4. Run npm start to start the script
  5. The script will connect to the database thus preventing it from pausing due to inactivity

Tip: You could add this script to a cron job or a scheduled task to run it at regular intervals

License

About

This Node.js script is used to establish a connection to a MongoDB database

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published