diff --git a/README.md b/README.md index 3d4ca93..9e53864 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ # Advertisement_Panel +## How To Run This Project +```bash +go run main.go +``` -This project is written with go, and has hot realoding for the main.go +## How To Add To This Project +This project is written with go, and has hot realoding (rebuilding when sensing changes) for the main.go Install Air ```bash @@ -12,15 +17,13 @@ Add air to path or use the following disgusting command $(go env GOPATH)/bin/air -c .air.toml ``` - # Tasks - [ ] Interface for adding new images - [ ] ATB integration - [ ] ASCII ART support -- [ ] show more spicy images after kl 10:00 +- [ ] show more spicy images after kl 22:00 - [ ] more images??? - -# NB +# NB!!!! Changes in the static directory will not rebuild the project, simple workaround is to just make a small change in main.go and save, for example adding a space diff --git a/go.mod b/go.mod index c9369b5..9827139 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module Advertisement_Panel -go 1.24.5 +go 1.24 diff --git a/main.go b/main.go index e39be8f..b97f6f8 100644 --- a/main.go +++ b/main.go @@ -2,13 +2,14 @@ package main import ( "encoding/json" + "fmt" "net/http" "os" "strings" ) func main() { - + fmt.Print("Now running server!") // Serves index http.HandleFunc("/", index_handler) diff --git a/static/index.html b/static/index.html index 550e9cc..884fc8a 100644 --- a/static/index.html +++ b/static/index.html @@ -32,7 +32,7 @@ setInterval(() => { index = (index + 1) % images.length; document.getElementById("images").src = images[index]; - }, 1000); + }, 10000); });