# mongodb-crud-phkl16

> Module that connects to mongodb and lets you perform crud operations

Latest version **1.0.1** (published 2017-12-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install mongodb-crud-phkl16
pnpm add mongodb-crud-phkl16
yarn add mongodb-crud-phkl16
bun add mongodb-crud-phkl16
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-12-18 |
| First published | 2017-12-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Philip Klingzell |
| Maintainers | klingzell92 |

## Links

- npm: https://www.npmjs.com/package/mongodb-crud-phkl16
- Repository: https://github.com/klingzell92/MongoCrud
- Homepage: https://github.com/klingzell92/MongoCrud#readme
- Issues: https://github.com/klingzell92/MongoCrud/issues
- npm.io page: https://npm.io/package/mongodb-crud-phkl16

## Dependencies (1)

- [mongodb](https://npm.io/package/mongodb.md) ^2.2.33

## Recent versions

- 1.0.1 (latest) — 2017-12-18
- 1.0.0 — 2017-12-18

## README

[![Build Status](https://scrutinizer-ci.com/g/klingzell92/mongodb-crud-phkl16/badges/build.png?b=master)](https://scrutinizer-ci.com/g/klingzell92/mongodb-crud-phkl16/build-status/master)
[![Code Coverage](https://scrutinizer-ci.com/g/klingzell92/mongodb-crud-phkl16/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/klingzell92/mongodb-crud-phkl16/?branch=master)

mongodb-crud-phkl16
====================
Module that connects to MongoDB and handles CRUD operations

Getting started
--------------
To install mongodb-crud-phkl16 simply run this in your command prompt.
```shell
npm install mongodb-crud-phkl16
```

To import mongodb-crud-phkl16 in your code use require like so.
```javascript
const mongocrud = require('mongodb-crud-phkl16')('mongodb://localhost:27017/collection', 'collection');
```
Where the first parameter is the dsn and the other parameter the collection to use.

Example
-------------
```javascript
// Get all documents from the collection
let result = mongocrud.getAll();

// Add a document to the collection
let movie = {
    director: 'Director',
    title: 'Title',
    release: 2017
};

mongocrud.create(movie);

// Get a document from the collection
let result = mongocrud.find(id);

// Update a document from the collection
let movie = {
    director: 'Director2',
    title: 'Title',
    release: 2017
};

mongocrud.update(id, movie);

// Delete a document from the collection
mongocrud.delete(id);

// Delete everything in the collection
mongocrud.delteAll();
```

---
_Source: https://npm.io/package/mongodb-crud-phkl16 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
