
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@trigo/atrix-mongoose
Advanced tools
atrix manoggose plugin automaticaly sets up the connection to you mongo db using monggose models
atrix-mongoose < 1.0.0 works with atrix < 6.0.0
atrix-mongoose >= 1.0.0 works with atrix >= 6.0.0
# install atrix framework
npm install -S @trigo/atrix
# install atrix-mongoose plugin
npm install -S @trigo/atrix-mongoose
# No need to install mongoose itself!
'use strict';
// ATTENTION: Do not require mongoose here!
module.exports = (mongoose) => {
return new mongoose.Schema({
name: {
type: 'string'
}
});
}
'use strict';
// ATTENTION: Do not require mongoose here!
module.exports = (mongoose, connection) => {
return {
TestModel: connection.model('TestModel', require('./TestModel')(mongoose)),
};
}
module.exports = (req, reply, service) => {
// access model class for connection "m1"
const TestModel_C1 = service.dataConnections.m1.schema.TestModel;
// access GridFs (gridfs-stream) for connection "m1"
const GridFs_C1 = service.dataConnections.m1.gridfs;
// access the mongoose connection object for connection "m1"
const Connection_C1 = service.dataConnections.m1.connection;
// access the mongoose object (shared between all connections)
const mongoose = service.dataConnections.m1.mongoose;
// get model class for connection "m2"
const TestModel_C2 = service.dataConnections.m2.schema.TestModel;
...
}
'use strict';
const atrix = require('@trigo/atrix');
const path = require('path');
const svc = atrix.addService({
name: 'mongoose',
endpoints: {
http: {
// declare port to bind
port: 3007,
// the directory containing the handler files
handlerDir: `${__dirname}/handlers`,
},
},
// declare a dataSource config section
dataSource: {
// name of the data source
m1: {
// type of data connection
type: 'mongoose',
// connection configuration
config: {
// path to the model factory module to be required by the plugin
modelFactory: path.join(__dirname, './models/factory'),
// database connection string
connectionString: 'localhost:27017/test-atrix-mongoose-m1',
},
},
m2: {
type: 'mongoose',
config: {
modelFactory: path.join(__dirname, './models/factory'),
connectionString: 'localhost:27017/test-atrix-mongoose-m2',
},
},
},
});
// start service.
// This will wait for the mongo connection to be available before starting up.
// When conection(s) is lost after initial startup the plugin automatically tries to reconnect
svc.start();
Run service with node index.js
If you installed mongoose itself and your code requires it somewhere before the plugin is loaded, you have a good chance to break connection & model setup. Do not install mongoose itself!. If unsure simply run npm remove -S mongoose in your application root folder.
If you update a package (especially mongoose) or the node version than you should run specs/failed-connection.specs.sh to ensure that the return codes on failed MongoDb connections are still correct.
FAQs
mongoosse plugin as atrix data source
The npm package @trigo/atrix-mongoose receives a total of 0 weekly downloads. As such, @trigo/atrix-mongoose popularity was classified as not popular.
We found that @trigo/atrix-mongoose demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.