# npm
$ npm install @mongodb-helpers/create-url
# yarn
$ yarn add @mongodb-helpers/create-url
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.