This commit is contained in:
parent
4c1734095e
commit
07d94a789a
|
@ -31,12 +31,13 @@ type Stat struct {
|
|||
}
|
||||
|
||||
func main() {
|
||||
var hostPort,baseURL string
|
||||
var hostPort,baseURL,database string
|
||||
flag.StringVar(&hostPort, "http", ":80", "host and port to listen on")
|
||||
flag.StringVar(&baseURL, "baseurl", "", "baseurl that the server should response with")
|
||||
flag.StringVar(&database, "database", "localhost:9999", "database hostpost")
|
||||
flag.Parse()
|
||||
|
||||
dsn := fmt.Sprintf("postgres://%v:%v@localhost:9999/hub?sslmode=disable", "postgres", "simple")
|
||||
dsn := fmt.Sprintf("postgres://%v:%v@%s/hub?sslmode=disable", "postgres", "simple", database)
|
||||
store, err := storage.New(dsn)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
Loading…
Reference in New Issue
Block a user