func NewDefaults() *AppServer {
	return New("development", "")
}
NewDefaults creates application server with defaults.
package gogo
import (
	"log"
	"net/http"
	"os"
	"path"
	"github.com/dolab/gogo/internal/params"
)
var (
	FindModeConfigFile = func(mode, cfgfile string) string {
		cfgfile = path.Clean(cfgfile)
		if len(cfgfile) == 0 || cfgfile == "." || cfgfile == ".." {
			return GogoSchema
		}
		finfo, ferr := os.Stat(cfgfile)
		if ferr != nil {
			return GogoSchema
		}
		if finfo.Mode()&os.ModeType == 0 {
			return cfgfile
		}
		filename := "application.yml"
		switch RunMode(mode) {
		case Development:
			filename = "application.development.yml"
		case Test:
			filename = "application.test.yml"
		case Production:
		}
		filepath := path.Join(cfgfile, "config", filename)
		if _, err := os.Stat(filepath); os.IsNotExist(err) {
			filepath = path.Join(cfgfile, "config", "application.yml")
		}
		return filepath
	}
	FindInterceptorConfigFile = func(mode, cfgfile string) string {
		cfgfile = path.Clean(cfgfile)
		if len(cfgfile) == 0 || cfgfile == "." || cfgfile == ".." {
			return GogoSchema
		}
		finfo, ferr := os.Stat(cfgfile)
		if ferr != nil {
			return GogoSchema
		}
		if finfo.Mode()&os.ModeType == 0 {
			return cfgfile
		}
		filename := "interceptors.yml"
		switch RunMode(mode) {
		case Development:
			filename = "interceptors.development.yml"
		case Test:
			filename = "interceptors.test.yml"
		case Production:
		}
		filepath := path.Join(cfgfile, "config", filename)
		if _, err := os.Stat(filepath); os.IsNotExist(err) {
			filepath = path.Join(cfgfile, "config", "interceptors.yml")
		}
		return filepath
	}
)
func New(runMode, cfgPath string) *AppServer {
	config, err := NewAppConfig(FindModeConfigFile(runMode, cfgPath))
	if err != nil {
		log.Fatalf("[GOGO] NewAppConfig(%s): %v", FindModeConfigFile(runMode, cfgPath), err)
	}
	return NewWithConfiger(config)
}