add handler, html templates, Makefile and migrations
This commit is contained in:
commit
a06e8db2ff
22 changed files with 1001 additions and 0 deletions
19
cmd/goddit/main.go
Normal file
19
cmd/goddit/main.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"git.snrd.de/Spaenny/goddit/postgres"
|
||||
"git.snrd.de/Spaenny/goddit/web"
|
||||
)
|
||||
|
||||
func main() {
|
||||
store, err := postgres.NewStore("postgres://postgres:secret@localhost/postgres?sslmode=disable")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
h := web.NewHandler(store)
|
||||
http.ListenAndServe(":3000", h)
|
||||
}
|
Reference in a new issue