mirror of
https://github.com/harivansh-afk/betterNAS.git
synced 2026-04-17 18:02:32 +00:00
pnpm, verify, cleanup
This commit is contained in:
parent
b68151035a
commit
28b6e9c264
45 changed files with 4276 additions and 5133 deletions
|
|
@ -60,12 +60,12 @@ func main() {
|
|||
})
|
||||
mux.HandleFunc("/api/v1/nodes/register", func(w http.ResponseWriter, r *http.Request) {
|
||||
writeJSON(w, http.StatusOK, jsonObject{
|
||||
"id": "dev-node",
|
||||
"machineId": "dev-machine",
|
||||
"displayName": "Development NAS",
|
||||
"agentVersion": "0.1.0-dev",
|
||||
"status": "online",
|
||||
"lastSeenAt": time.Now().UTC().Format(time.RFC3339),
|
||||
"id": "dev-node",
|
||||
"machineId": "dev-machine",
|
||||
"displayName": "Development NAS",
|
||||
"agentVersion": "0.1.0-dev",
|
||||
"status": "online",
|
||||
"lastSeenAt": time.Now().UTC().Format(time.RFC3339),
|
||||
"directAddress": env("BETTERNAS_NODE_DIRECT_ADDRESS", "http://localhost:8090"),
|
||||
"relayAddress": nil,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
"scripts": {
|
||||
"dev": "CGO_ENABLED=0 go run ./cmd/control-plane",
|
||||
"build": "mkdir -p dist && CGO_ENABLED=0 go build -o dist/control-plane ./cmd/control-plane",
|
||||
"format": "files=$(find . -name '*.go' -type f) && if [ -n \"$files\" ]; then gofmt -w $files; fi",
|
||||
"format:check": "files=$(find . -name '*.go' -type f) && if [ -n \"$files\" ]; then test -z \"$(gofmt -l $files)\"; fi",
|
||||
"lint": "CGO_ENABLED=0 go vet ./...",
|
||||
"check-types": "CGO_ENABLED=0 go test ./...",
|
||||
"test": "CGO_ENABLED=0 go test ./..."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue