Skip to content

Commit 2c485bf

Browse files
committed
include _Linkora's workflow_ and database information in the SERVER_IS_CONFIGURED route content
1 parent 8821654 commit 2c485bf

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

src/main/kotlin/com/sakethh/linkora/presentation/routing/Routing.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import io.ktor.server.application.*
2020
import io.ktor.server.auth.*
2121
import io.ktor.server.response.*
2222
import io.ktor.server.routing.*
23+
import org.jetbrains.exposed.sql.Database
2324
import java.net.InetAddress
2425

2526
fun Application.configureRouting(serverConfig: ServerConfig, markdownManagerRepo: MarkdownManagerRepo) {
@@ -46,7 +47,7 @@ fun Application.configureRouting(serverConfig: ServerConfig, markdownManagerRepo
4647
} else {
4748
""
4849
}
49-
val requiredHtml = markdownManagerRepo.getRawHtmlBasedOnRawMD("The sync-server version is ${Constants.SERVER_VERSION}.\n")+markdownManagerRepo.getRawHtmlBasedOnMDFile(
50+
val requiredHtml = markdownManagerRepo.getRawHtmlBasedOnRawMD("The sync-server version is **${Constants.SERVER_VERSION}**.\n\nYou are currently connected to the **${Database.getDialectName(serverConfig.databaseUrl)}** database, which will be **used by the server to store data**.")+markdownManagerRepo.getRawHtmlBasedOnMDFile(
5051
fileLocation = "/raw/SERVER_IS_CONFIGURED.md", placeHolder = "#{PLACEHOLDER_1}" to placeHolderValue
5152
)
5253
call.respondText(contentType = ContentType.Text.Html, text = requiredHtml)

src/main/resources/raw/SERVER_IS_CONFIGURED.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
It seems you've correctly configured the sync-server.
22

3-
Before anything, check out this video where I explained how to connect the app and the server. That should clear up most things.
4-
53
This server is meant to communicate only with the **[Linkora](https://github.com/LinkoraApp/Linkora)** apps, available on **Android** and **Desktop**. There's no web-based frontend yet, so you can’t control anything through a web interface. That said, if you’re willing to build your own custom solution from scratch that connects to this server and does what it needs to, then it’s totally possible.
64

75
## Important Notes
@@ -37,7 +35,13 @@ This server is meant to communicate only with the **[Linkora](https://github.com
3735
- Except for this route, every other route is secured by an auth token. Access is only granted if the client provides the correct auth token that you’ve set. Without it, they won’t be able to access anything.
3836

3937
## Troubleshooting & Additional Help
40-
- If something isn’t covered here, check out the **YouTube video** where I explained how to connect the app and the server.
41-
- Also, go through **[GitHub issues](https://github.com/LinkoraApp/sync-server/issues)**; you might find the solution there.
38+
- If something isn’t covered here, go through **[GitHub issues](https://github.com/LinkoraApp/sync-server/issues)**; you might find the solution there.
4239
- If not, **[create an issue on GitHub](https://github.com/LinkoraApp/sync-server/issues/new)**, and I'll fix it when I get some time.
43-
- You can also [join the Discord](https://discord.gg/ZDBXNtv8MD) if you want. It’s there for questions, updates, or just to hang out.
40+
- You can also [join the Discord](https://discord.gg/ZDBXNtv8MD) if you want. It’s there for questions, updates, or just to hang out.
41+
42+
---
43+
#### Workflow of Linkora, which should make it easier to understand how everything works:
44+
45+
<a href="https://i.ibb.co/QFTF9qWD/linkora-outline.png" onclick="window.open(this.href, '_blank'); return false;">
46+
<img alt="linkora-outline.png" src="https://i.ibb.co/QFTF9qWD/linkora-outline.png" style="max-width: 100%; height: auto;">
47+
</a>

0 commit comments

Comments
 (0)