fix(docker): add dockfile and small fixes (#38)
* fix(docker): add dockfile and small fixes * chore(readme): small fixes
This commit is contained in:
parent
c8a3f911e8
commit
b0d1cdccfc
11 changed files with 126 additions and 36 deletions
|
@ -31,11 +31,14 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if len(opts.Configs) > 0 {
|
||||
for _, configPath := range opts.Configs {
|
||||
if strings.HasSuffix(configPath, ".yml") || strings.HasSuffix(configPath, ".yaml") {
|
||||
fmt.Printf("launching config: %s\n", configPath)
|
||||
cfg, err = cfg.Load(gocfg.YAML(configPath))
|
||||
} else if strings.HasSuffix(configPath, ".json") {
|
||||
fmt.Printf("launching config: %s\n", configPath)
|
||||
cfg, err = cfg.Load(gocfg.JSON(configPath))
|
||||
} else {
|
||||
panic(fmt.Sprintf("unknown config file type (.yml .yaml .json are supported): %s", configPath))
|
||||
|
@ -62,6 +65,7 @@ func main() {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
fmt.Printf("quickshare is listening %d\n", cfg.GrabInt("Server.Port"))
|
||||
err = srv.Start()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue