hastic-zzz/hastic-server

Review connection string format

Opened this issue · 1 comments

This is from documentation of mongodb

mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[database][?options]]

hint: it's a URI

this is what we actually have in the default config:

HASTIC_DB_CONNECTION_TYPE: nedb
HASTIC_DB_CONNECTION_STRING: hastic:password@mongodb:27017/hastic

We can get the type of database from connection string very beginning (see mongo example).
Also, let's just be accurate in format of connection strings.

I propose to add a new possible value for nedb:

nedb://<local_path>