0.1.0 • Published 3 years ago

@mongodb-helpers/create-url v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@mongodb-helpers/create-url


Build Status Coverage Status NPM version Code Size License

Simple helper function to generate mongodb url from config object 🎐.

Installation

# npm
$ npm install @mongodb-helpers/create-url
# yarn
$ yarn add @mongodb-helpers/create-url

Usage

This is a practical example of how to use.

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 © Imed Jaberi