MCPcopy Create free account
hub / github.com/codealong-dev/ride-sharing / NewMongoDefaultConfig

Function NewMongoDefaultConfig

shared/db/mongodb.go:27–32  ·  view source on GitHub ↗

NewMongoConfig creates a new MongoDB configuration from environment variables

()

Source from the content-addressed store, hash-verified

25
26// NewMongoConfig creates a new MongoDB configuration from environment variables
27func NewMongoDefaultConfig() *MongoConfig {
28 return &MongoConfig{
29 URI: os.Getenv("MONGODB_URI"),
30 Database: "ride-sharing",
31 }
32}
33
34// NewMongoClient creates a new MongoDB client
35func NewMongoClient(ctx context.Context, cfg *MongoConfig) (*mongo.Client, error) {

Callers 1

mainFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected