added some tests for the json storage.

This commit is contained in:
sm
2016-02-15 01:42:20 -08:00
parent 9e9bb74c4a
commit 456d502b72
4 changed files with 96 additions and 13 deletions
+2 -3
View File
@@ -96,10 +96,9 @@ func main() {
}
log.Printf("serving at: http://%s:%d/", hostname, c.Port)
sm := http.NewServeMux()
ms := vain.NewMemStore(c.DB)
ms := vain.NewSimpleStore(c.DB)
if err := ms.Load(); err != nil {
log.Printf("unable to load db: %v", err)
os.Exit(1)
log.Printf("unable to load db: %v; creating fresh database", err)
}
vain.NewServer(sm, ms, c.Host)
addr := fmt.Sprintf(":%d", c.Port)