# README
database/mongodb
Enable
liquor app enable database/mongodb
# or
go get github.com/go-liquor/liquor-sdk/modules/database/mongodb
in cmd/app/main.go
add module
package main
import (
"github.com/go-liquor/framework/internal/adapters/server/http"
"github.com/go-liquor/framework/internal/app/services"
"github.com/go-liquor/liquor-sdk/app"
"github.com/go-liquor/liquor-sdk/modules/database/mongodb" // add this
)
func main() {
app.NewApp(
mongodb.DatabaseMongoDBModule, // add this
http.Server,
app.RegisterService(
services.NewInitialService,
),
)
}
# Functions
NewConnection create a new connection to mongodb database
Returns: - *mongo.Client: a new connection to mongodb database.
UseDatabase use a database in mongodb
Returns: - *mongo.Database: a database in mongodb.
# Variables
No description provided by the author