HTTP Server
Overview
Setting Up the HTTP Server
package main
import (
"github.com/Diarkis/diarkis/diarkisexec"
"github.com/Diarkis/diarkis-server-template/cmds"
)
func main() {
logConfigPath := "/configs/shared/log.json"
meshConfigPath := "/configs/shared/mesh.json"
diarkisexec.SetupDiarkis(logConfigPath, meshConfigPath, &diarkisexec.Modules{
Dive: &diarkisexec.Options{ConfigPath: "/configs/shared/dive.json", ExposeCommands: true},
Field: &diarkisexec.Options{ConfigPath: "/configs/shared/field.json", ExposeCommands: true},
DM: &diarkisexec.Options{ConfigPath: "/configs/shared/dm.json", ExposeCommands: true},
MatchMaker: &diarkisexec.Options{ConfigPath: "/configs/shared/matching.json", ExposeCommands: true},
})
httpcmds.SetupHTTP()
diarkisexec.SetupDiarkisHTTPServer("/configs/http/main.json")
diarkisexec.StartDiarkis()
}Mesh Configuration
HTTP Server Configuration
Key
Default
Creating Custom HTTP Endpoints
Using JSON in HTTP Endpoints
最終更新
役に立ちましたか?

