Skip to content

Commit

Permalink
Merge branch 'feature/startup-messages' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
diffuse committed Jul 5, 2020
2 parents 54cce94 + f57158e commit 5993c7f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/gloss/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ import (

func main() {
// create a thread-safe database instance for use with the router
log.Println("connecting to database")
db := pgsql.NewDatabase()
defer db.Close()

// create a router and associate the database with it
log.Println("setting up routes")
r := chi.NewRouter(db)

// create server with some reasonable defaults
Expand All @@ -27,5 +29,6 @@ func main() {
}

// serve
log.Println("serving")
log.Fatal(s.ListenAndServe())
}

0 comments on commit 5993c7f

Please sign in to comment.