<commit_before>package registry

import (
	"os"

	"github.com/nildev/lib/Godeps/_workspace/src/gopkg.in/mgo.v2"
)

var (
	mongoDBClientURL = "mongodb://localhost:27017/test"
	databaseName     = "default"
)

// These constants is public API, being taken by lib from environment
const (
	NDMongoDBURL   = "ND_MONGODB_URL"
	NDDatabaseName = "ND_DATABASE_NAME"
)

// GetMongoDBClient create mongoDB client based on client<commit_msg>Add new registry method to get environemnt api is running<commit_after>package registry

import (
	"os"

	"github.com/nildev/lib/Godeps/_workspace/src/gopkg.in/mgo.v2"
)

var (
	mongoDBClientURL = "mongodb://localhost:27017/test"
	databaseName     = "default"
)

// These constants is public API, being taken by lib from environment
const (
	NDMongoDBURL   = "ND_MONGODB_URL"
	NDDatabaseName = "ND_DATABASE_NAME"
	NDEnv          = "ND_ENV"

	EnvDev = "dev"
)

// GetEnv return environment
func GetEnv() string {
	env := os.Getenv(NDEnv)
	if env == "" {
		env = EnvDev
	}

	return env
}

// GetMongoDBClient create mongoDB client based on client
{'fraction_non_alphanumeric': 0.10624417520969245, 'fraction_numerical': 0.011183597390493943, 'mean_word_length': 3.926605504587156, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5590410', 'n_tokens_mistral': 410, 'n_tokens_neox': 395, 'n_words': 92}