intial import

This commit is contained in:
Thomas Preisner 2018-09-09 21:38:37 +02:00
commit 2e90d32ce2
5 changed files with 264 additions and 0 deletions

19
main.go Normal file
View file

@ -0,0 +1,19 @@
package main
import (
"net/http"
)
func main() {
db, err := prepareDatabase()
if err != nil {
panic(err)
}
defer db.Close()
http.HandleFunc("/", basicAuth(db))
err = http.ListenAndServe(":3002", nil)
if err != nil {
panic(err)
}
}