Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Port that the server will be listening on. Port string // Environment development or production. Environment string // MongoCredentials is the URI Link to connect with MongoDB. MongoCredentials string // DBName is the name of the database that contains our collections DBName string )
Functions ¶
func SetupDB ¶
func SetupDB() error
SetupDB Sets up connection to database.
Establishes a default configuration for the mgm library, to then be used throughout the project. It then makes a call to pingDB() which uses the default mongo driver to connect a client to be used for a ping, if no errors occurred then the ping was successful and we can then use mgm library.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.