Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
damless-mongo
Advanced tools
Readme
Method | Param | DamLess method |
---|---|---|
GET | /:id | httpFindOne |
GET | /? | httpFind |
POST | httpInsertOne | |
PUT | /:id | httpSaveOne |
PATCH | /:id | httpUpdateOne with $set |
DELETE | /:id | httpDeleteOne |
const { Http } = require("damless-mongo");
class Api extends Http {
//giveme is the dependency injection service used by damless
constructor(giveme) {
super(giveme, "<collectionName>");
};
...
}
Method | Description |
---|---|
httpFindOne | |
httpFind | |
httpInsertOne | |
httpInsertMany | |
httpSaveOne | |
httpUpdateOne | |
httpSaveMany | |
httpUpdateMany | |
httpDeleteOne | |
httpDeleteMany | |
httpCount | |
httpAggregate |
Method | Description |
---|---|
saveOne | |
save | |
insertOne | |
insert | |
updateOne | |
update | |
replaceOne | |
deleteOne | |
delete | |
findOne | |
find | |
aggregate | |
count |
Method | Description |
---|---|
mongoInsertOne | |
mongoInsertMany | |
mongoAggregate | |
mongoBulkWrite | |
mongoCreateIndex | |
mongoCreateIndexes | |
mongoCount | |
mongoCreateIndexes | |
mongoDeleteOne | |
mongoDeleteMany | |
mongoDistinct | |
mongoDrop | |
mongoDropIfExists | |
mongoDropIndex | |
mongoDropIndexes | |
mongoFindOne | |
mongoFind | |
mongoFindOneAndDelete | |
mongoFindOneAndReplace | |
mongoFindOneAndUpdate | |
mongoGeoHaystackSearch | |
mongoGeoNear | |
mongoGroup | |
mongoMapReduce | |
mongoReplaceOne | |
mongoSave | |
mongoUpdateOne | |
mongoUpdateMany |
const { Http } = require("damless-mongo");
const { promisify } = require("util");
const stream = require("stream");
const pipeline = promisify(stream.pipeline);
class Api extends Http {
// giveme is the dependency injection service used by damless
constructor(giveme) {
super(giveme, "<collectionName>");
};
// override the default httpFind an use Crud primitives
async httpFind(context, stream, headers) {
// get a mongo cursor
const cursor = this.findWords(context.query.q);
await pipeline(
cursor,
stream
);
}
}
{
"mongo": {
"connectionString": "mongodb://localhost:27017/database"
},
}
{
"services": [
{ "name": "mongo", "location": "damless-mongo" }
]
}
Or in javascript
const DamLess = require("damless");
const damless = new DamLess();
damless.inject("mongo", "damless-mongo");
$ npm install damless-mongo
To run our tests, clone the damless-mongo repo and install the dependencies.
$ git clone https://github.com/BenoitClaveau/damless-mongo --depth 1
$ cd damless-mongo
$ npm install
$ mongod --dbpath ./data/db
$ node.exe "../node_modules/mocha/bin/mocha" tests
FAQs
Mongo client for damless
The npm package damless-mongo receives a total of 47 weekly downloads. As such, damless-mongo popularity was classified as not popular.
We found that damless-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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.