Some changes were made for a MVP

This commit is contained in:
2025-08-16 20:05:18 +02:00
parent 140a129114
commit 9bda8a066b
4 changed files with 12 additions and 8 deletions

View File

@@ -1,6 +1,11 @@
# Advertisement_Panel # 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 Install Air
```bash ```bash
@@ -12,15 +17,13 @@ Add air to path or use the following disgusting command
$(go env GOPATH)/bin/air -c .air.toml $(go env GOPATH)/bin/air -c .air.toml
``` ```
# Tasks # Tasks
- [ ] Interface for adding new images - [ ] Interface for adding new images
- [ ] ATB integration - [ ] ATB integration
- [ ] ASCII ART support - [ ] ASCII ART support
- [ ] show more spicy images after kl 10:00 - [ ] show more spicy images after kl 22:00
- [ ] more images??? - [ ] 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 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

2
go.mod
View File

@@ -1,3 +1,3 @@
module Advertisement_Panel module Advertisement_Panel
go 1.24.5 go 1.24

View File

@@ -2,13 +2,14 @@ package main
import ( import (
"encoding/json" "encoding/json"
"fmt"
"net/http" "net/http"
"os" "os"
"strings" "strings"
) )
func main() { func main() {
fmt.Print("Now running server!")
// Serves index // Serves index
http.HandleFunc("/", index_handler) http.HandleFunc("/", index_handler)

View File

@@ -32,7 +32,7 @@
setInterval(() => { setInterval(() => {
index = (index + 1) % images.length; index = (index + 1) % images.length;
document.getElementById("images").src = images[index]; document.getElementById("images").src = images[index];
}, 1000); }, 10000);
}); });
</script> </script>
</body> </body>