Launching Diarkis Server in a Local Environment
Introduction
This page explains the steps to start the Diarkis server locally using the Diarkis Server Template. It is recommended to go through these steps before starting development with Diarkis.
Environment Preparation
To introduce the server template, Go 1.22 or later is required.
The installation method varies by platform, so follow the official documentation for installation: https://go.dev/doc/install
Diarkis server development can be conducted on macOS, Linux, and Windows.
In a Windows environment, operations are confirmed on WSL1 on Windows 10 (Ubuntu 20.04). Since WSL2 does not support UDP port forwarding, please use WSL1.
If you are not using WSL1, you can convert the WSL environment by starting PowerShell as an administrator and running the command wsl --set-version Ubuntu-20.04 1
.
Generate a Project from the Server Template
First, clone the repository by executing
git clone https://github.com/Diarkis/diarkis-server-template.git
in any PATH.Execute the following command to generate the project. The output destination will be the absolute path specified in
output
.
The project ID
and builder token
mentioned here are information issued to developers with an enterprise license of Diarkis. Since the Diarkis main body itself is created as closed-source and implemented in Go, it needs to be built using diarkis-cli.
If you need a past version, you can use it by checking out a tag of any version or downloading it from the release list.
Setup
Execute the following command in the generated project.
This will download various resources necessary for development (such as references for using code completion).
Generating the Server Binary
To generate binaries for local use, run the following make task:
When you run the above, the Diarkis binaries will be generated under remote_bin
.
Starting the Server
Start the MARS, HTTP, and UDP servers.
Getting Connection Information
If mars, http, and udp are started, you can obtain the connection information with curl as follows. This completes the server startup.
The HTTP endpoint above means that it has authenticated with the UDP server with uid test
. The information returned from this can be used by various client libraries to exchange packets.
最終更新