restructure: console→client-console, add admin-console skeleton, move docs to doc/
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package main
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"admin-console/internal/api"
|
||||
)
|
||||
|
||||
func main() {
|
||||
adminToken := os.Getenv("ADMIN_TOKEN")
|
||||
if adminToken == "" {
|
||||
log.Fatal("ADMIN_TOKEN env variable is required")
|
||||
}
|
||||
|
||||
srv := api.NewServer(adminToken)
|
||||
|
||||
mux := http.NewServeMux()
|
||||
srv.RegisterRoutes(mux)
|
||||
|
||||
addr := ":8091"
|
||||
log.Printf("admin-console starting on %s", addr)
|
||||
if err := http.ListenAndServe(addr, mux); err != nil {
|
||||
log.Fatalf("server error: %v", err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user