Skip to content

Commit 360f071

Browse files
author
Amit
committed
updated readme.md file
1 parent c2c09c3 commit 360f071

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

Readme.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
11
# go-mongodb-client
22

3-
A simple utility Go package for connecting to Mongodb. This package has following features:
4-
1. Connecting to mongodb client.
5-
2. Creating new database once the mongodb client is connected.
3+
A simple utility Go package for connecting to MongoDB.
4+
This package provides the following features:
5+
6+
1. Connecting to a MongoDB client.
7+
2. Creating a new database once the MongoDB client is connected.
68
3. Creating collections inside the database.
79

8-
## Install
10+
---
11+
12+
## 📦 Installation
913

1014
```bash
1115
go get github.com/amitjangid80/go-mongodb-client@latest
16+
17+
18+
import (
19+
"github.com/amitjangid80/go-mongodb-client/mongodb_client"
20+
)
21+
22+
func main() {
23+
mongodbConfig := mongodb_client.MongodbConfig{
24+
Username: "your_mongo_db_username",
25+
Password: "your_mongodb_password",
26+
Host: "localhost",
27+
Port: "your_mongodb_port",
28+
DbName: "your_db_name",
29+
}
30+
31+
mongodb_client.ConnectDb(&mongodbConfig)
32+
}

0 commit comments

Comments
 (0)