This commit is contained in:
2022-11-22 13:46:44 +08:00
parent 4784078dc7
commit bfe739e442
3 changed files with 10 additions and 3 deletions

View File

@@ -55,7 +55,7 @@ var (
func init() {
var err error
DB, err = sql.Open("postgres", "postgres://itsc@localhost:5432/itsc?sslmode=disable")
DB, err = sql.Open("postgres", os.Getenv("POSTGRES_CONNSTR"))
if err != nil {
log.Fatal(err)
}
@@ -63,6 +63,7 @@ func init() {
if len(os.Args) > 1{
if os.Args[1] == "install" {
install()
os.Exit(0)
}
}