Skip to content

Commit 45f7cc5

Browse files
committed
simple (no db and cache)
1 parent df414a8 commit 45f7cc5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

datastore.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ type Datastore struct {
3030

3131
// New - returns a new datastore which contains redis, database, view globals and settings.
3232
func New() *Datastore {
33+
store := Simple()
34+
store.DB = getDBConnection(store.Settings)
35+
store.Cache = getCacheConnection(store.Settings)
36+
return store
37+
}
38+
39+
func Simple() *Datastore {
3340
store := &Datastore{}
3441
settings := loadSettings()
3542

@@ -61,8 +68,7 @@ func New() *Datastore {
6168
log.Info("App Started. Server Is: " + settings.ServerIs)
6269

6370
store.Settings = settings
64-
store.DB = getDBConnection(settings)
65-
store.Cache = getCacheConnection(settings)
71+
6672
// store.S3 = getS3Connection()
6773
return store
6874
}

0 commit comments

Comments
 (0)