Move Environment prompt back under Server section

pull/127/head
Matt Baer 5 years ago
parent a740c67495
commit b8b15c8550
  1. 15
      config/setup.go

@ -60,8 +60,15 @@ func Configure(fname string, configSections string) (*SetupData, error) {
Selected: fmt.Sprintf(`{{.Label}} {{ . | faint }}`),
}
var selPrompt promptui.Select
var prompt promptui.Prompt
if strings.Contains(configSections, "server") {
title(" Server setup ")
fmt.Println()
// Environment selection
selPrompt := promptui.Select{
selPrompt = promptui.Select{
Templates: selTmpls,
Label: "Environment",
Items: []string{"Development", "Production, standalone", "Production, behind reverse proxy"},
@ -75,12 +82,6 @@ func Configure(fname string, configSections string) (*SetupData, error) {
data.Config.Server.Dev = isDevEnv
var prompt promptui.Prompt
if strings.Contains(configSections, "server") {
title(" Server setup ")
fmt.Println()
if isDevEnv || !isStandalone {
// Running in dev environment or behind reverse proxy; ask for port
prompt = promptui.Prompt{

Loading…
Cancel
Save