Skip to content

Instantly share code, notes, and snippets.

View soleroks's full-sized avatar
💭
foss ❤

soleroks

💭
foss ❤
View GitHub Profile
@hackinf0
hackinf0 / Connecting Multiple Database in NodeJs with MongoDB and Mongoose
Last active February 21, 2025 20:47
Connecting Multiple Database in NodeJs with MongoDB and Mongoose
Explanation file: db.js
This code imports the mongoose library which allows to connect to a MongoDB database.
There are two URIs defined to connect to two different databases: MONGO_URI and MOBILE_URI.
Each URI contains connection information to a remote MongoDB database, including user credentials.
The connectDBs function uses the mongoose.createConnection method to create connections to these two
databases using the respective URIs. The useUnifiedTopology and useNewUrlParser options are set to enable the new
unified topology policy and use MongoDB's new URL parser, respectively.
The function returns an object that contains the connections to these two databases as qrCodeDb and userDB properties.
@Iliannnn
Iliannnn / Discord.js-v14-Events.md
Last active June 4, 2025 04:05
Discord.js v14 Events - Cheatsheet

Discord.js v14 Events

An overview of all events in Discord.js v14 with examples.

📢 | Last updated: 27 July 2022

ℹ️ | client references to your client instance.

ℹ️ | The v13 overview can be found here.