Update readmes, make slight code change

This commit is contained in:
Maxwell Jeffress
2024-11-23 19:38:19 +11:00
parent d839652916
commit f69a3fb599
3 changed files with 21 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
# Chookpen Server
# Chookchat Server
Key features:
- Real-time messaging with WebSocket support
@@ -41,7 +41,7 @@ To create a distribution (you don't need to run gradle build, it will do that fo
./gradlew installDist
```
To run the server, create the files `chatHistory` and `userDatabase` in the directory you're running it from, then run the script to start Chookpen.
To run the server, create the files `chatHistory` and `userDatabase` in the directory you're running it from, then run the script to start Chookchat.
## API Documentation
@@ -84,7 +84,7 @@ Connect to `/api/websocket` for real-time updates.
## Setting up HTTPS with Caddy
Caddy provides automatic HTTPS and serves as a reverse proxy for your Chookpen server. [Download from caddyserver.com](https://caddyserver.com/download) or from your Linux/BSD/Illumos/Haiku/TempleOS/whatever distribution's package manager.
Caddy provides automatic HTTPS and serves as a reverse proxy for your Chookchat server. [Download from caddyserver.com](https://caddyserver.com/download) or from your Linux/BSD/Illumos/Haiku/TempleOS/whatever distribution's package manager.
1. Create a `Caddyfile` in your server directory:
```

View File

@@ -387,9 +387,17 @@ fun main(args: Array<String>) {
}
}
.start(7070)
println("Type a command for the server")
while (1 == 1) {
println(handleServerCommand(readln()))
try {
if (args[0] == "-i") {
println("Type a command for the server")
while (1 == 1) {
println(handleServerCommand(readln()))
}
} else {
println("Interactive mode disabled, add -i to enable")
}
} catch (error: Exception) {
println("Interactive mode disabled, add -i to enable")
}
}