Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
loopback-connector-mongodb
Advanced tools
MongoDB connector for loopback-datasource-juggler.
To use it you need loopback-datasource-juggler@1.0.x
.
Setup dependencies in package.json
:
{
...
"dependencies": {
"loopback-datasource-juggler": "1.0.x",
"loopback-connector-mongodb": "1.0.x"
},
...
}
Use:
var DataSource = require('loopback-datasource-juggler').DataSource;
var ds = new DataSource('mongodb');
...
By default, examples and tests from this module assume there is a MongoDB server instance running on localhost at port 27017.
To customize the settings, you can drop in a .loopbackrc
file to the root directory
of the project or the home folder.
The .loopbackrc file should be in JSON format, for example:
{
"dev": {
"mongodb": {
"host": "127.0.0.1",
"database": "test",
"username": "youruser",
"password": "yourpass",
"port": 27017
}
},
"test": {
"mongodb": {
"host": "127.0.0.1",
"database": "test",
"username": "youruser",
"password": "yourpass",
"port": 27017
}
}
}
Note: username/password is only required if the MongoDB server has authentication enabled.
npm test
FAQs
The official MongoDB connector for the LoopBack framework.
The npm package loopback-connector-mongodb receives a total of 13,205 weekly downloads. As such, loopback-connector-mongodb popularity was classified as popular.
We found that loopback-connector-mongodb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers 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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.