Run DLX using a Binary
mainDownload the pre-compiled binary for your specific platform from the Releases page and execute it directly.
./dlxrepository·main·Indexed 27 days ago
https://github.com/owo-network/dlxA self-hosted translation API server written in Go. DLX provides a simple HTTP interface on port 1188 for translation services and can be deployed via Docker, Docker Compose, or as a pre-compiled binary.
./dlxcompose.yaml file for Docker Compose orchestration.service.InitConfig(), sets the Gin mode to ReleaseMode, and starts a router instance created by service.Router(cfg). The service listens on the IP and Port specified in the configuration.DLX exposes a simple HTTP API on port 1188. To perform a translation, send a POST request to the /translate endpoint with a JSON body containing the text, source language, and target language.
curl -X POST http://localhost:1188/translate \
-H "Content-Type: application/json" \
-d '{"text": "Hello, world!", "source_lang": "EN", "target_lang": "ZH"}'When running DLX using Docker Compose, you can provide authentication and session credentials using the following environment variables:
TOKEN: A security token used for authentication (e.g., helloworld).DL_SESSION: The session identifier required for operation (e.g., xxxxxx).services:
dlx:
image: ghcr.io/owo-network/dlx:latest
restart: always
ports:
- "1188:1188"
environment:
- TOKEN=helloworld
- DL_SESSION=xxxxxx