MongoDB-CRUD

command
v0.0.0-...-988b5a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 6 Imported by: 0

README

MongoDB CRUD

This is an example project that shows the basics of working with the MongoDB database in golang. Go provides an abstract datalayer using the go.mongodb.org/mongo-driver/ standard library.

Prerequisites

  • Local MongoDB instance
  • Valid Golang installation

Getting started

First you need to install the MongoDB Go drivers.

go get go.mongodb.org/mongo-driver

Or install it using a the dep package manager.

dep ensure --add go.mongodb.org/mongo-driver/mongo \
go.mongodb.org/mongo-driver/bson \
go.mongodb.org/mongo-driver/mongo/options

You can then start the application using go run.

go run mongodb.go

Implementation

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL