intial import
This commit is contained in:
commit
2e90d32ce2
5 changed files with 264 additions and 0 deletions
19
main.go
Normal file
19
main.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue