HTTP Server
Overview
The HTTP server serves as the entry point for Diarkis. The application server connects to the HTTP server to obtain the endpoint for real-time connections and the encryption keys.
Additionally, it is possible to define custom endpoints.
Setting Up the HTTP Server
To expose built-in commands to the client, you can use the diarkisexec
package for setup.
You can expose built-in commands by specifying the module through
diarkisexec.SetupDiarkis()
. By specifyingConfigPath
for each module, you can customize the settings.You can expose custom commands using
diarkisexec.SetServerCommandHandler()
.You can set up a UDP server using
diarkisexec.SetupDiarkisHTTPServer()
. You can customize server settings using a JSON file as an argument.
For more details, refer to the diarkisexec API reference.
Mesh Configuration
For meshConfigPath
, specify the path to the JSON file. For details, refer to Mesh Configuration.
HTTP Server Configuration
Settings are specified in JSON.
For more details, refer to the HTTP API reference.
Creating Custom HTTP Endpoints
Diarkis's HTTP server allows you to write custom endpoints.
最終更新