open-index/open-npm huggingface dataset:
npm package: @mongodb-helpers/connect
Description: Don't repeat yourself when you want to connect to mongodb 🧚🏻‍♂️.
Author: imed jaberi
Latest version: 0.2.1

# @mongodb-helpers/connect

---

[![Build Status][travis-img]][travis-url]
[![Coverage Status][coverage-img]][coverage-url]
[![NPM version][npm-badge]][npm-url]
![Code Size][code-size-badge]
[![License][license-badge]][license-url]

<!-- ***************** -->

[travis-img]: https://travis-ci.com/mongodb-helpers/connect.svg?branch=master
[travis-url]: https://travis-ci.com/mongodb-helpers/connect
[coverage-img]: https://coveralls.io/repos/github/mongodb-helpers/connect/badge.svg?branch=master
[coverage-url]: https://coveralls.io/github/mongodb-helpers/connect?branch=master
[npm-badge]: https://img.shields.io/npm/v/@mongodb-helpers/connect.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@mongodb-helpers/connect
[license-badge]: https://img.shields.io/badge/license-MIT-green.svg?style=flat
[license-url]: https://github.com/mongodb-helpers/connect/blob/master/LICENSE
[code-size-badge]: https://img.shields.io/github/languages/code-size/mongodb-helpers/connect
[pr-welcoming-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat

<!-- ***************** -->

### Don't repeat yourself when you want to connect to mongodb 🧚🏻‍♂️.

## `Installation`

```bash
# npm
$ npm install @mongodb-helpers/connect mongodb
# yarn
$ yarn add @mongodb-helpers/connect mongodb
```

When use mongoose should you also add `mongoose`

## `Usage`

This is a practical example of how to use.

with MongoDB driver:

```typescript
import { connect, withMongoose } from "@mongodb-helpers/connect";

const connection = await connect({ url: process.env.MONGODB_URL });
// connection.db : database instance
// connection.client: mongodb client instance
// connection.onClose: helper function to close connection

// withMongoose take mongodb client instance as param
withMongoose(connection.client);
```

with Mongoose ODM:

```typescript
import { connect } from "@mongodb-helpers/connect/mongoose";

const connection = await connect({ url: process.env.MONGODB_URL });
// connection.db : database instance
// connection.client: mongoose client instance
// connection.mongodbClient: mongodb client instance
// connection.onClose: helper function to close connection
```

#### License

---

[MIT](LICENSE) &copy; [Imed Jaberi](https://github.com/3imed-jaberi)
npm package: @mongodb-helpers/create-url
Description: Simple helper function to generate mongodb url from config object
Author: imed jaberi
Latest version: 0.1.0

# @mongodb-helpers/create-url

---

[![Build Status][travis-img]][travis-url]
[![Coverage Status][coverage-img]][coverage-url]
[![NPM version][npm-badge]][npm-url]
![Code Size][code-size-badge]
[![License][license-badge]][license-url]

<!-- ***************** -->

[travis-img]: https://travis-ci.com/mongodb-helpers/create-url.svg?branch=master
[travis-url]: https://travis-ci.com/mongodb-helpers/create-url
[coverage-img]: https://coveralls.io/repos/github/mongodb-helpers/create-url/badge.svg?branch=master
[coverage-url]: https://coveralls.io/github/mongodb-helpers/create-url?branch=master
[npm-badge]: https://img.shields.io/npm/v/@mongodb-helpers/create-url.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@mongodb-helpers/create-url
[license-badge]: https://img.shields.io/badge/license-MIT-green.svg?style=flat
[license-url]: https://github.com/mongodb-helpers/create-url/blob/master/LICENSE
[code-size-badge]: https://img.shields.io/github/languages/code-size/mongodb-helpers/create-url
[pr-welcoming-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat

<!-- ***************** -->

### Simple helper function to generate mongodb url from config object 🎐.

## `Installation`

```bash
# npm
$ npm install @mongodb-helpers/create-url
# yarn
$ yarn add @mongodb-helpers/create-url
```

## `Usage`

This is a practical example of how to use.

```typescript
import { createMongoDbUrl } from "@mongodb-helpers/create-url";

const murl = await createMongoDbUrl({
  username: "imed",
  password: "my-pwd",
  hostname: "my-host.domain.xyz",
  port: 12345,
  database: "my-db",
});

// you can use the url to connect to mongodb through any client.
```

#### License

---

[MIT](LICENSE) &copy; [Imed Jaberi](https://github.com/3imed-jaberi)
npm package: @mongodb-helpers/health-check
Description: Simple helper function for checking if your mongoose/mongodb connection to MongoDB is good
Author: imed jaberi
Latest version: 0.1.1

# @mongodb-helpers/health-check

---

[![Build Status][travis-img]][travis-url]
[![Coverage Status][coverage-img]][coverage-url]
[![NPM version][npm-badge]][npm-url]
![Code Size][code-size-badge]
[![License][license-badge]][license-url]

<!-- ***************** -->

[travis-img]: https://travis-ci.com/mongodb-helpers/health-check.svg?branch=master
[travis-url]: https://travis-ci.com/mongodb-helpers/health-check
[coverage-img]: https://coveralls.io/repos/github/mongodb-helpers/health-check/badge.svg?branch=master
[coverage-url]: https://coveralls.io/github/mongodb-helpers/health-check?branch=master
[npm-badge]: https://img.shields.io/npm/v/@mongodb-helpers/health-check.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@mongodb-helpers/health-check
[license-badge]: https://img.shields.io/badge/license-MIT-green.svg?style=flat
[license-url]: https://github.com/mongodb-helpers/health-check/blob/master/LICENSE
[code-size-badge]: https://img.shields.io/github/languages/code-size/mongodb-helpers/health-check
[pr-welcoming-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat

<!-- ***************** -->

### Simple helper function for checking if your mongoose/mongodb connection to MongoDB is good 🪁.

## `Installation`

```bash
# npm
$ npm install @mongodb-helpers/health-check mongodb
# yarn
$ yarn add @mongodb-helpers/health-check mongodb
```

When use mongoose should you also add `mongoose`

## `Usage`

This is a practical example of how to use.

```typescript
import { healthCheck } from "@mongodb-helpers/health-check";

const status = await healthCheck(MonogoDBorMongooseClient);
// 'Connected' | 'Disconnected'
// MonogoDBorMongooseClient:
// - mongodb: const client = await MongoClient.connect(MONGODB_URL)
// - mongoose: const client = await mongoose.connect(MONGODB_URL)
```

#### License

---

[MIT](LICENSE) &copy; [Imed Jaberi](https://github.com/3imed-jaberi)