added GetUser function
This commit is contained in:
parent
6df7c52e9e
commit
b665bf63a0
5 changed files with 112 additions and 6 deletions
11
main.go
11
main.go
|
|
@ -27,8 +27,17 @@ func main() {
|
|||
log.Fatalf("sweeping stale locks: %v", err)
|
||||
}
|
||||
|
||||
srv := NewServer(&fakeST{dept: "History", chapterID: 602}, store, secret)
|
||||
apiKey := os.Getenv("ST_API_KEY")
|
||||
if apiKey == "" {
|
||||
log.Fatal("ST_API_KEY not set")
|
||||
}
|
||||
|
||||
dryRun := os.Getenv("DRY_RUN") != ""
|
||||
if dryRun {
|
||||
log.Println("DRY_RUN set: no writes will be sent to Solidarity Tech")
|
||||
}
|
||||
|
||||
srv := NewServer(NewClient(apiKey, dryRun), store, secret)
|
||||
log.Println("listening on :8080")
|
||||
log.Fatal(http.ListenAndServe(":8080", srv.Routes()))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue