Skip to content

Commit

Permalink
typos and unused flag
Browse files Browse the repository at this point in the history
Signed-off-by: Guillem Bonet <[email protected]>
  • Loading branch information
Guillembonet committed Jul 22, 2024
1 parent cf1d9a5 commit 599f31e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ It also contains the [Alpine.js](https://alpinejs.dev/) library for some compone

## Usage

To run the application, with live reaload install [air](https://github.com/air-verse/air) and the `air` command.
To run the application with live reload, install [air](https://github.com/air-verse/air) and use the `air` command.

Instead, you can also run the application with the `go run cmd/main.go` command and use `go generate ./...` to re-generate the templ files and tailwind css file.

## Contributing

Expand Down
5 changes: 4 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func main() {
os.Exit(1)
}

server, err := server.NewServer(":8080", handlers.NewStatic())
server, err := server.NewServer(*flagAddress, handlers.NewStatic())
if err != nil {
slog.Error("failed to create server", slog.Any("err", err))
os.Exit(1)
Expand All @@ -49,6 +49,9 @@ func main() {
stopped := make(chan struct{})
go func() {
defer close(stopped)

slog.Info("starting server", slog.String("address", *flagAddress))

if err := server.Run(); err != nil && !errors.Is(err, http.ErrServerClosed) {
slog.Error("server failed", slog.Any("err", err))
}
Expand Down

0 comments on commit 599f31e

Please sign in to comment.