Skip to content

Commit

Permalink
Added dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Farcic committed Dec 30, 2018
1 parent ab9205a commit 7b3516b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ var (
)

func main() {
logPrintf("Starting the application\n")
if len(os.Getenv("SERVICE_NAME")) > 0 {
serviceName = os.Getenv("SERVICE_NAME")
}
Expand All @@ -63,6 +64,7 @@ func setupDb() {
if len(db) == 0 {
db = "localhost"
}
logPrintf("Configuring DB %s\n", db)
session, err := mgo.Dial(db)
if err != nil {
panic(err)
Expand All @@ -71,6 +73,7 @@ func setupDb() {
}

func RunServer() {
logPrintf("Starting the server\n")
mux := http.NewServeMux()
mux.HandleFunc("/demo/hello", HelloServer)
mux.HandleFunc("/demo/person", PersonServer)
Expand Down

0 comments on commit 7b3516b

Please sign in to comment.