Add data layer

This includes config changes, collections, posts, some post rendering
funcs, and actual database connection when the server starts up.
This commit is contained in:
Matt Baer
2018-10-16 22:31:27 -04:00
parent f7430fb8bc
commit 0c1e1dd57e
8 changed files with 2616 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ import (
"strings"
)
func initRoutes(handler *Handler, r *mux.Router, cfg *config.Config) {
func initRoutes(handler *Handler, r *mux.Router, cfg *config.Config, db *datastore) {
isSingleUser := !cfg.App.MultiUser
// Write.as router