Fill in remaining missing pieces

- Database schema changes, removing obsolete custom domain-related code
- Missing user structs
- Setup verbiage changes
- Missing routes
- Missing error messages
This commit is contained in:
Matt Baer
2018-11-08 01:31:01 -05:00
parent 6dbf0c8764
commit 55ada67170
8 changed files with 142 additions and 117 deletions

View File

@@ -10,7 +10,8 @@ const (
type (
ServerCfg struct {
Port int `ini:"port"`
HiddenHost string `ini:"hidden_host"`
Port int `ini:"port"`
Dev bool `ini:"-"`
}

View File

@@ -10,11 +10,14 @@ import (
func Configure() error {
c, err := Load()
var action string
if err != nil {
fmt.Println("No configuration yet. Creating new.")
c = New()
action = "generate"
} else {
fmt.Println("Configuration loaded.")
action = "update"
}
title := color.New(color.Bold, color.BgGreen).PrintlnFunc()
@@ -22,7 +25,7 @@ func Configure() error {
fmt.Println()
intro(" ✍ Write Freely Configuration ✍")
fmt.Println()
fmt.Println(wordwrap.WrapString(" This quick configuration process will generate the application's config file, "+FileName+".\n\n It validates your input along the way, so you can be sure any future errors aren't caused by a bad configuration. If you'd rather configure your server manually, instead run: writefreely --create-config and edit that file.", 75))
fmt.Println(wordwrap.WrapString(" This quick configuration process will "+action+" the application's config file, "+FileName+".\n\n It validates your input along the way, so you can be sure any future errors aren't caused by a bad configuration. If you'd rather configure your server manually, instead run: writefreely --create-config and edit that file.", 75))
fmt.Println()
title(" Server setup ")