Skip to content

hjqhezgh/gopher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Gopher

Golang中国(www.golang.tc)源代码.

##Requirements

  • Go1.0+
  • MongoDB
  • github.com/gorilla/mux
  • github.com/gorilla/sessions
  • github.com/qiniu/api
  • github.com/qiniu/bytes
  • github.com/qiniu/rpc
  • labix.org/v2/mgo
  • code.google.com/p/go-uuid/uuid
  • github.com/jimmykuu/webhelpers
  • github.com/jimmykuu/wtforms

##Install

go get -u github.com/gorilla/mux
go get -u github.com/gorilla/sessions
go get -u labix.org/v2/mgo
go get -u code.google.com/p/go-uuid/uuid
go get -u github.com/jimmykuu/webhelpers
go get -u github.com/jimmykuu/wtforms
go get -u github.com/qiniu/api
go get -u github.com/qiniu/bytes
go get -u github.com/qiniu/rpc
git clone git://github.com/jimmykuu/gopher.git

修改文件 etc/config.json.defaultetc/config.json 作为配置文件

  • superusers: 内容为用户名,如果没有管理员,内容为"",如果有多个,用英文逗号隔开
  • analytics_file: 内容为统计分析代码的文件名
  • time_zone_offset: 时差,跟UTC的时间差,单位小时

内容如下:

{
    "host": "http://localhost:8888",
    "port": 8888,
    "db": "localhost:27017",
    "cookie_secret": "05e0ba2eca9411e18155109add4b8aac",
    "smtp_username": "username@example.com",
    "smtp_password": "password",
    "smtp_host": "smtp.example.com",
    "smtp_addr": "smtp.example.com:25",
    "from_email": "who@example.com",
    "superusers": "jimmykuu,another",
    "analytics_file": "",
    "time_zone_offset": 8,
    "static_file_version": 1
}

先启动MongoDB

Linux/Unix/Mac OS X:

$ cd gopher
$ ./build.sh
$ ./bin/server

Windows:

> cd gopher
> build.bat
> bin\server.exe

##Contributors

##License

Copyright (c) 2012-2013

Released under the MIT license:

About

Golang-China(golang.tc) Website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.7%
  • Shell 0.3%