rough skeleton and basic user authentication

This commit is contained in:
zomo
2025-10-31 10:32:50 -05:00
commit 8355ca374b
17 changed files with 542 additions and 0 deletions

33
api/main.go Normal file
View File

@@ -0,0 +1,33 @@
package api
import (
"github.com/gin-gonic/gin"
"zomo.dev/largehadroncollider/db"
"zomo.dev/largehadroncollider/ttv"
"zomo.dev/largehadroncollider/util"
)
func InitApiServer(conf *util.Config, dbConn *db.DBConn, twitchConn *ttv.TwitchConn) (*ApiServer, error) {
engine := gin.Default()
apiServer := &ApiServer{ engine, conf, dbConn, twitchConn }
apiServer.loadEndpoints()
return apiServer, nil
}
type ApiServer struct {
engine *gin.Engine
conf *util.Config
db *db.DBConn
twitch *ttv.TwitchConn
}
func (server *ApiServer) Listen() {
server.engine.Run()
}
func initHTMLFiles() {
}