diff options
author | Steve <nilslice@gmail.com> | 2016-12-19 11:19:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-19 11:19:53 -0800 |
commit | 3791fadda7b761ffba38c567da29e2e71acd1dfb (patch) | |
tree | 79d810f9aafa1868ee0760983937470d0eea3db8 /cmd/ponzu/main.go | |
parent | b20c5bdee38682edc851e646d815a34689c3c923 (diff) |
[addons] Creating foundation for plugin-like system "Addons" (#24)
* adding addons dir and sample addon which enables the use of a new input element in forms for referencing other content. "addons" is a conceptual plugin-like feature, similar to wordpress "plugins" dir, but not as sophisticated
Diffstat (limited to 'cmd/ponzu/main.go')
-rw-r--r-- | cmd/ponzu/main.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cmd/ponzu/main.go b/cmd/ponzu/main.go index ebcbbad..b2b5e75 100644 --- a/cmd/ponzu/main.go +++ b/cmd/ponzu/main.go @@ -15,6 +15,9 @@ import ( "github.com/bosssauce/ponzu/system/api/analytics" "github.com/bosssauce/ponzu/system/db" "github.com/bosssauce/ponzu/system/tls" + + // import registers content types + _ "github.com/bosssauce/ponzu/content" ) var year = fmt.Sprintf("%d", time.Now().Year()) @@ -291,7 +294,14 @@ func main() { tls.Enable() } - log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), nil)) + // save the port the system is listening on so internal system can make + // HTTP api calls while in dev or production w/o adding more cli flags + err := db.PutConfig("http_port", fmt.Sprintf("%d", port)) + if err != nil { + log.Fatalln("System failed to save config. Please try to run again.") + } + + log.Fatalln(http.ListenAndServe(fmt.Sprintf(":%d", port), nil)) case "": fmt.Println(usage) |