Skip to content

Commit

Permalink
log.Panic in case of failed Run
Browse files Browse the repository at this point in the history
  • Loading branch information
zer0tonin committed Jun 3, 2023
1 parent 4c3fcd4 commit 3d86390
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ Launch the app using docker:

```sh
docker run -v ~/Code/Mikochi/data:/data \
-p 8080:8080 -e host="0.0.0.0:8080" \
-e data_dir="/data" -e jwt_secret=my_secret \
-e username=root -e password=pass \
-p 8080:8080 -e HOST="0.0.0.0:8080" \
-e DATA_DIR="/data" -e JWT_SECRET=my_super_secret \
-e USERNAME=my_username -e PASSWORD=my_secure_password \
zer0tonin/mikochi:latest
```

Expand Down
5 changes: 4 additions & 1 deletion backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,8 @@ func main() {

host := viper.GetString("HOST")
log.Print("Listening on " + host)
r.Run(host)
err := r.Run(host)
if err != nil {
log.Panicf("Failed to launch web server: %s", err.Error())
}
}

0 comments on commit 3d86390

Please sign in to comment.