code: func Connect(config *Config) (*Connection, error) {
  
  	con := &Connection{
  		Config:        config,
  		Session:       nil,
  		modelRegistry: make(map[string]*Model),
  		typeRegistry:  make(map[string]reflect.Type),
  	}
  
  	if config.Locals == nil {
  		if _, filename, _, ok := runtime.Caller(0); ok {
  
  			filepath := path.Join(path.Dir(filename), "locals.json")
  			file, err := ioutil.ReadFile(filepath)
  
  			if err != nil {
  				return nil, err
  			}
  
  			var localMap map[string]map[string]string
  			json.Unmarshal(file, &localMap)
  
  			locals = localMap["en-US"]
  		} else {
  			panic("No caller information to read default localisation file")
  		}
  	} else {
  		locals = config.Locals
  	}
  
  	err := con.Open()
  
  	return con, err
  }
docs: /*
  Use this method to connect to a mongo db instance. The only parameter which is expected is a *mongodm.Config object.
  
  For example:
  
  	dbConfig := &mongodm.Config{
  		DatabaseHosts: []string{"localhost"},
  		DatabaseName: "mongodm_sample",
  	}
  
  	connection, err := mongodm.Connect(dbConfig)
  
  	if err != nil {
  		log.E("Database connection error: %v", err)
  	}
  
  After this step you can register your created models. See: func (*Connection) Register
  */