-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add dev server and auto reloading
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Re-render blog | ||
-R '^dist/' -r '^_site/.*' -- \ | ||
./renderblog | ||
|
||
# Rebuild binary | ||
-R '^dist/' -r '\.go$' -- \ | ||
make build-render | ||
|
||
# Rerun tailwind when templates or tailwind config change | ||
-R '^dist/' -r '\.html\.tmpl$|tailwind\.config\.js$' -- \ | ||
./renderblog -f=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
package main | ||
|
||
func main() { | ||
import "net/http" | ||
|
||
func main() { | ||
dist := http.FileServer(http.Dir("dist")) | ||
err := http.ListenAndServe("localhost:8080", dist) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} |