Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blankeos/go-htmx-templ
🐀🔵 Learning to hate JS frameworks like a chad
https://github.com/blankeos/go-htmx-templ
Last synced: 4 days ago
JSON representation
🐀🔵 Learning to hate JS frameworks like a chad
- Host: GitHub
- URL: https://github.com/blankeos/go-htmx-templ
- Owner: Blankeos
- Created: 2024-02-22T15:54:15.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-02-24T19:57:02.000Z (9 months ago)
- Last Synced: 2024-05-15T15:31:35.497Z (6 months ago)
- Language: Go
- Size: 12.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project htmx
One Paragraph of project description goes here
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
## MakeFile
run all make commands with clean tests
```bash
make all build
```build the application
```bash
make build
```run the application
```bash
make run
```Create DB container
```bash
make docker-run
```Shutdown DB container
```bash
make docker-down
```live reload the application
```bash
make watch
```run the test suite
```bash
make test
```clean up binary from the last build
```bash
make clean
```### What I added:
Mac/Windows/Linux agnostic .air.toml file.
I was able to accomplish this by:1. During `make watch`, I add `export WATCHING="true"` to check if I'm watching. So we can build the executable into `tmp/main` instead for `make build`.
2. Remove `bin` inside `.air.toml`. This is so that it checks `tmp/main.exe` for windows and checks `tmp/main` for other OS (default behavior).
3. Adding an if statement that checks `$$(go env GOHOSTOS) = "windows"`.
4. If "windows", I build it in tmp/main.exe.
5. If else, I build it in tmp/main.