Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd committed Nov 20, 2024
1 parent bf44ade commit 816dec2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# RemoteCommand

Execute server command through HTTP interface.
Execute server command through http interface.

This plugin is used in allay official test server to add support for auto update.

# Configuration

TODO

# Http API

TODO
Let's say you set http server port to 19133, then the base url is `http://localhost:19133/remotecommand`.
Please note that only POST method is allowed!

Parameters:
- `token` The token you set in `config.yml`.
- `command` The command you want to execute.

## License

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/allaymc/remotecommand/Config.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.allaymc.remotecommand;

import eu.okaeri.configs.OkaeriConfig;
import eu.okaeri.configs.annotation.Comment;
import eu.okaeri.configs.annotation.CustomKey;
import lombok.Getter;
import lombok.experimental.Accessors;
Expand All @@ -12,7 +13,9 @@
@Getter
@Accessors(fluent = true)
public class Config extends OkaeriConfig {
@Comment("The token used to verify the request. Do not share it to other!")
private String token = RandomStringUtils.randomAlphanumeric(32);
@Comment("The port of the http server")
@CustomKey("http-server-port")
private int httpServerPort = 19133;
}

0 comments on commit 816dec2

Please sign in to comment.