Browse Source

add start.sh+bat

pull/47/head
skyblue 11 years ago
parent
commit
587e6d8089
  1. 2
      .gobuild.yml
  2. 2
      start.bat
  3. 6
      start.sh
  4. 3
      web.go

2
.gobuild.yml

@ -6,3 +6,5 @@ filesets:
- LICENSE - LICENSE
- README.md - README.md
- README_ZH.md - README_ZH.md
- start.bat
- start.sh

2
start.bat

@ -0,0 +1,2 @@
@echo off
gogs.exe web

6
start.sh

@ -0,0 +1,6 @@
#!/bin/bash -
#
# start gogs web
#
cd "$(dirname $0)"
./gogs web

3
web.go

@ -160,6 +160,7 @@ func runWeb(*cli.Context) {
base.Cfg.MustValue("server", "HTTP_PORT", "3000")) base.Cfg.MustValue("server", "HTTP_PORT", "3000"))
log.Info("Listen: %s", listenAddr) log.Info("Listen: %s", listenAddr)
if err := http.ListenAndServe(listenAddr, m); err != nil { if err := http.ListenAndServe(listenAddr, m); err != nil {
log.Critical(err.Error()) fmt.Println(err.Error())
//log.Critical(err.Error()) // not working now
} }
} }

Loading…
Cancel
Save