diff --git a/README.md b/README.md index 8b57b39..d4fec98 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ RustyHearts-API is a Node.js-based REST API that enables authentication, billing The API consists of three independent servers (Auth API, Billing API and Launcher API) running on different ports. +### Preview +![image](api.png) + ### API region support The api currently only support the **usa** (PWE) region. @@ -17,13 +20,13 @@ The api currently only support the **usa** (PWE) region. - The Launcher API is a web server intended to handle the client connection to the gateserver and for the [Rusty Hearts Launcher](https://github.com/JuniorDark/RustyHearts-Launcher), which handles registration, login, client updates, and processing static elements (public directory). This API must be accessible from the outside and proxied by Nginx or bound to an external IP. ## Table of Contents +* [Preview](#preview) * [Public folder](#public-folder-description) * [Requirements](#requirements) * [Deployment](#deployment) * [Basic Installation](#basic-installation) * [.env file setup](#env-file-setup) * [Available endpoints](#available-endpoints) -* [Preview](#preview) * [License](#license) * [Contributing](#contributing) * [FAQ](#faq) @@ -35,6 +38,11 @@ The api currently only support the **usa** (PWE) region. In order for the launcher to automatically update itself, you need to use the launcher_info.ini in the `launcher_update` directory of the api. This file specifies the version of the launcher. After each update of the launcher, you need to change the version in the ini, as well in the launcher executable file. +### Client download + +In order to create client download, you need to use the `client` directory of the api. +The tool for creating the client files is available in the repository: https://github.com/JuniorDark/RustyHearts-MIPTool + ### Client patch In order to create client patches, you need to use the `patch` directory of the api. @@ -126,9 +134,6 @@ Endpoint | Method | Arguments | Description /launcherApi/launcherUpdater/updateLauncherVersion | POST | version | Download the specified launcher versionr from the launcher_update folder. /serverApi/onlineCount | GET | | Returns the number of online players. Returns a JSON object with the count. -### Preview -![image](api.png) - ## License This project is licensed under the terms found in [`LICENSE-0BSD`](LICENSE). @@ -147,6 +152,4 @@ Contributions from the community are welcome! If you encounter a bug or have a f If you need help with the api, please submit an issue on GitHub. ## Roadmap -* Add support for client download/repair -* Improve performance and stability * Add support for other regions diff --git a/package.json b/package.json index 6bd642d..f1cc4d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "RustyHearts-API", - "version": "1.1.0", + "version": "1.2.0", "description": "Rusty Hearts REST API implementation on node.js", "main": "src/app.js", "scripts": { diff --git a/public/launcher/launcher_update/launcher_1.0.0.zip.txt b/public/launcher/client/download/place filelist and client files here.txt similarity index 100% rename from public/launcher/launcher_update/launcher_1.0.0.zip.txt rename to public/launcher/client/download/place filelist and client files here.txt diff --git a/public/launcher/launcher_update/launcher_1.2.0.zip.txt b/public/launcher/launcher_update/launcher_1.2.0.zip.txt new file mode 100644 index 0000000..e69de29 diff --git a/public/launcher/launcher_update/launcher_info.ini b/public/launcher/launcher_update/launcher_info.ini index 6e221b7..b68465a 100644 --- a/public/launcher/launcher_update/launcher_info.ini +++ b/public/launcher/launcher_update/launcher_info.ini @@ -1,2 +1,2 @@ [LAUNCHER] -version=1.1.0 \ No newline at end of file +version=1.2.0 \ No newline at end of file diff --git a/src/app.js b/src/app.js index a68aa3f..e0ff3e1 100644 --- a/src/app.js +++ b/src/app.js @@ -83,6 +83,7 @@ app.get('/favicon.ico', (req, res) => { app.use('/launcher/news/images', express.static(path.join(__dirname, '../public/launcher/news/images'))); app.use('/launcher/news', express.static(path.join(__dirname, '../public/launcher/news'))); app.use('/launcher/patch', express.static(path.join(__dirname, '../public/launcher/patch'))); +app.use('/launcher/client', express.static(path.join(__dirname, '../public/launcher/client'))); // Set up error handling middleware @@ -123,7 +124,7 @@ const port = process.env.PORT || 3000; const publicIP = process.env.PUBLIC_IP || '0.0.0.0'; console.log('--------------------------------------------------'); -console.log(`Rusty Hearts API Version: 1.1`) +console.log(`Rusty Hearts API Version: 1.2`) console.log(`Node.js Version: ${nodeVersion}`); console.log(`Timezone: ${timezone} (${offsetString})`); console.log('Memory Usage:'); @@ -150,8 +151,8 @@ function logMemoryUsage() { console.log('--------------------------------------------------'); } -// Log memory usage every 10 minutes (600000 milliseconds) -const memoryLogInterval = 600000; +// Log memory usage every 30 minutes (1800000 milliseconds) +const memoryLogInterval = 1800000; setInterval(logMemoryUsage, memoryLogInterval);