Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
adonis-lucid-mongodb
Advanced tools
NB - WORK IN PROGRESS
:pray: This repository is forked of adonis-lucid to connect with mongodb.
Adonis-lucid is a database query builder and ORM for Adonis framework. It also has support for database migrations, seeds and factories.
But it not support MongoDB. So I've forked and make new repository adonis-lucid-mongo because adonis has no plan to support mongodb in core framework
You can learn more about AdonisJS and all of its awesomeness on http://adonisjs.com :evergreen_tree:
To setup this package
$ npm i --save adonis-lucid-mongodb
and then register lucid providers inside the your bootstrap/app.js
file.
const providers = [
'adonis-lucid-mongodb/providers/DatabaseProvider',
'adonis-lucid-mongodb/providers/LucidProvider',
'adonis-lucid-mongodb/providers/SchemaProvider',
'adonis-lucid-mongodb/providers/MigrationsProvider',
'adonis-lucid-mongodb/providers/CommandsProvider',
'adonis-lucid-mongodb/providers/FactoryProvider',
'adonis-lucid-mongodb/providers/SeederProvider',
]
setting up aliases inside bootstrap/app.js
file.
const aliases = {
Database: 'Adonis/Src/Database',
LucidMongo: 'Adonis/Src/LucidMongo',
Schema: 'Adonis/Src/Schema'
Migrations: 'Adonis/Src/Migrations',
Factory: 'Adonis/Src/Factory'
}
add config to config/database.js
file
module.exports = {
/*
|--------------------------------------------------------------------------
| Default Connection
|--------------------------------------------------------------------------
|
| Connection defines the default connection settings to be used while
| interacting with SQL databases.
|
*/
connection: Env.get('DB_CONNECTION', 'mongodb'),
/*-------------------------------------------------------------------------*/
mongodb: {
client: 'mongodb',
connection: {
host: Env.get('DB_HOST', 'localhost'),
port: Env.get('DB_PORT', 27017),
user: Env.get('DB_USER', 'root'),
password: Env.get('DB_PASSWORD', ''),
database: Env.get('DB_DATABASE', 'adonis')
}
}
}
In favor of active development we accept contributions for everyone. You can contribute by submitting a bug, creating pull requests or even improving documentation.
FAQs
AdonisJs Mongodb ORM
The npm package adonis-lucid-mongodb receives a total of 37 weekly downloads. As such, adonis-lucid-mongodb popularity was classified as not popular.
We found that adonis-lucid-mongodb 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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.