
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
rt-mongo
, a wrapper for the node-mongo-driver
, allows you to easily and simply manage your MongoDB databases in real time, with an API similar to the firestore web api.
You can do the following with rt-mongo
:
rt-mongo
is written in TypeScript, so you can get intellisense and type-checking easily.
The rt-mongo
API is very simple, fast, and easy to use, a plus some alternatives lack.
Personally, I think rt-mongo
is great for projects like bots for services like discord and guilded and other instances.
Although rt-mongo
is a great tool, it's not the perfect one. Here are some alternatives:
quick-mongo
- Quick-mongo also uses MongoDB, but it's a lot more limited. However, it's also very beginner friendly so if you're new to databases and think rt-mongo
is a little too hard for you, check it out hereimport { createClient } from 'rt-mongo';
const main = async () => {
const client = await createClient('mongodb://localhost:27017');
const db = client.database('mongofiretest');
const employees = db.collection('employees');
const employees = [
{
name: 'Bob',
job: 'Programmer',
},
{
name: 'Tom',
job: 'Programmer'
},
{
name: 'Addison',
job: 'CEO'
}
];
const promises = employees.map(employee => db.add(employee));
await Promise.all(promises);
const query = await employees
.where('job', '==', 'Programmer')
.getData();
console.log(query);
};
main();
Getting documents from their ID and getting data, then deleting it.
import { createClient } from 'rt-mongo';
const main = async () => {
const client = await createClient('mongodb://localhost:27017');
const db = client.database('mongofiretest');
const col = db.collection('mycol');
const doc = col.doc(id);
const data = await doc.getData();
await doc.delete();
};
main();
Compound queries
import { createClient, where } from 'rt-mongo';
const main = async () => {
const client = await createClient('mongodb://localhost:27017');
const db = client.database('mongofiretest');
const collection = db.collection('mycol');
const docs = await collection
.where('job', 'in', [ 'X', 'Y' ])
.neither(
where('name', '==', 'Bob'),
where('yearsAtJob', '==', '1')
)
.getData();
};
main();
FAQs
A wrapper for MongoDB for Node that mimics the Firebase API closely
The npm package rt-mongo receives a total of 0 weekly downloads. As such, rt-mongo popularity was classified as not popular.
We found that rt-mongo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.