Skip to content

Commit 1400ffd

Browse files
committed
log bind/serve errors
1 parent 61ea104 commit 1400ffd

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

2-
export CGO_CFLAGS := -g -O2 -Wno-return-local-addr -Wno-stringop-overflow
2+
export CGO_CFLAGS := -g -O2 -Wno-return-local-addr
3+
# -Wno-stringop-overflow
34

45
build:
56
CGO_FLAGS=$CGO_FLAGS go build --tags="fts5"

dev.cfg.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"DatabaseURI": "dev.db?cache=shared",
3+
"ListenAddr": "0.0.0.0:7001",
34
"Debug": true
4-
}
5+
}

monet.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ func main() {
161161

162162
slog.Info("Running with config", "config", config.String())
163163
slog.Info("Listening on", "addr", config.ListenAddr)
164-
http.ListenAndServe(config.ListenAddr, r)
164+
if err := http.ListenAndServe(config.ListenAddr, r); err != nil {
165+
slog.Error("error listening", "err", err)
166+
}
165167
}
166168

167169
func index(w http.ResponseWriter, r *http.Request) {

0 commit comments

Comments
 (0)