Skip to content

mongodb-helpers/create-url

Repository files navigation

@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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published