Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up hot module reloading #7

Merged
merged 3 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
hmr:
templ generate --watch --proxy="http://localhost:1323" --cmd="go run ."

start:
go run .
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# chronologger

To run, do `go run .`
Chronologger is a personal review app, built with Golang.

# Development

Start the application with hot module reloading using `make hmr`.

Alternatively, if you don't need hot module reloading, you can just run `go run .` or `make start`

## Known issues

```
(!) templ version check failed: failed to parse go.mod file: ~/chronologger/go.mod:3: invalid go version '1.21.0': must match format 1.23
```
To fix this, make sure you have at least the following version installed:
```
go install github.com/a-h/templ/cmd/templ@v0.2.543
```
You can test this by running `templ version`.
jonnyjones99 marked this conversation as resolved.
Show resolved Hide resolved

Please submit a PR first TEST
1 change: 0 additions & 1 deletion base.templ
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ templ hello(name string) {
opacity: 0.5;
}
</style>

}
6 changes: 3 additions & 3 deletions base_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.