You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
831 B

11 years ago
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package main
import (
11 years ago
"fmt"
"net/http"
11 years ago
"github.com/codegangsta/martini"
11 years ago
"github.com/martini-contrib/render"
11 years ago
"github.com/gogits/gogs/routers"
11 years ago
"github.com/gogits/gogs/utils"
"github.com/gogits/gogs/utils/log"
11 years ago
)
const APP_VER = "0.0.0.0212"
11 years ago
func init() {
}
11 years ago
func main() {
11 years ago
log.Info("App Name: %s", utils.Cfg.MustValue("", "APP_NAME"))
11 years ago
m := martini.Classic()
11 years ago
// Middleware.
m.Use(render.Renderer())
// Routers.
m.Get("/", routers.Dashboard)
11 years ago
listenAddr := fmt.Sprintf("%s:%s",
utils.Cfg.MustValue("server", "HTTP_ADDR"),
utils.Cfg.MustValue("server", "HTTP_PORT", "3000"))
log.Info("Listen: %s", listenAddr)
http.ListenAndServe(listenAddr, m)
11 years ago
}