bara bra grejjor

This commit is contained in:
skidoodle 2024-10-10 17:07:08 +02:00
parent 2aa7b29b23
commit 8ea02ee188
Signed by: albert
GPG key ID: A06E3070D7D55BF2
5 changed files with 20 additions and 5 deletions

0
data/.gitkeep Normal file
View file

12
docker-compose.dev.yaml Normal file
View file

@ -0,0 +1,12 @@
services:
trackncore:
build: .
container_name: trackncore
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- data:/app/data
volumes:
data:

View file

@ -6,7 +6,7 @@ services:
ports:
- "3000:3000"
volumes:
- data:/app
- data:/app/data
volumes:
data:

6
go.mod
View file

@ -4,10 +4,12 @@ go 1.23
toolchain go1.23.2
require github.com/PuerkitoBio/goquery v1.10.0
require (
github.com/PuerkitoBio/goquery v1.10.0
github.com/joho/godotenv v1.5.1
)
require (
github.com/andybalholm/cascadia v1.3.2 // indirect
github.com/joho/godotenv v1.5.1 // indirect
golang.org/x/net v0.30.0 // indirect
)

View file

@ -25,7 +25,8 @@ type ProfileData struct {
var (
profiles = map[string]string{}
jsonFile = "data.json"
jsonFile = "./data/data.json"
profilesFile = "profiles.json"
baseUrl = "https://ncore.pro/profile.php?id="
nick string
pass string
@ -38,7 +39,7 @@ func init() {
nick = os.Getenv("NICK")
pass = os.Getenv("PASS")
file, err := os.Open("profiles.json")
file, err := os.Open(profilesFile)
if err != nil {
log.Fatal(err)
}