You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-8Lines changed: 32 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,10 +47,26 @@ will be prompted to provide the required values, which will be saved locally.
47
47
```
48
48
49
49
-`databaseUrl`: The database URL (without username or password).
50
-
-`databaseUser`: The username for your database.
51
-
-`databasePassword`: The password for your database.
52
-
-`hostAddress`: The host address of the server. If not provided, defaults to `0.0.0.0`.
53
-
-`serverPort`: The port number on which the server runs. If not provided, defaults to `8080`.
50
+
-`databaseUrl` should always start with the name of the database you're using:
51
+
- PGSQL (or) PostgreSQL :
52
+
```
53
+
postgresql://someAddress:port/linkora
54
+
```
55
+
- MySQL :
56
+
```
57
+
mysql://someAddress:port/linkora
58
+
```
59
+
- SQLite :
60
+
```
61
+
sqlite:path-to-db
62
+
```
63
+
`path-to-db` should look something like `sqlite:/home/saketh/Documents/sqlite/databaseFileName`
64
+
- `databaseUser`: The username of the database you want to connect to.
65
+
- If you are using SQLite, leave this blank or press Enter when the setup prompts for it.
66
+
- `databasePassword`: The password of the database you want to connect to.
67
+
- If you are using SQLite, leave this blank or press Enter when the setup prompts for it.
68
+
- `hostAddress`: The host address of the server. If not provided, it defaults to the `IPv4` of the network currently connected to. When connecting from Linkora apps, you should pass this address instead of `localhost`.
69
+
- `serverPort`: The port number on which the server runs. If not provided, defaults to `45454`.
54
70
- `serverAuthToken`: A secure token used to authenticate requests from the Linkora app. Treat this like a password and
55
71
keep it confidential.
56
72
@@ -65,13 +81,15 @@ set:
65
81
66
82
- `LINKORA_SERVER_USE_ENV_VAL`: Set this to `true` to enable the use of environment variables. This must always be `true` when using environment variables.
67
83
- `LINKORA_DATABASE_URL`: The database URL (without username or password).
68
-
-`LINKORA_DATABASE_USER`: The username for your database.
69
-
-`LINKORA_DATABASE_PASSWORD`: The password for your database.
84
+
- `LINKORA_DATABASE_USER`: The username of the database you want to connect to.
85
+
- If you are using SQLite, leave this blank.
86
+
- `LINKORA_DATABASE_PASSWORD`: The password of the database you want to connect to.
87
+
- If you are using SQLite, leave this blank.
70
88
- `LINKORA_SERVER_AUTH_TOKEN`: A secure token used to authenticate requests from the Linkora app. Treat this like a
71
89
password and
72
90
keep it confidential.
73
-
-`LINKORA_HOST_ADDRESS`: The host address of the server. If not provided, defaults to `0.0.0.0`.
74
-
-`LINKORA_SERVER_PORT`: The port number on which the server runs. If not provided, defaults to `8080`.
91
+
- `LINKORA_HOST_ADDRESS`: The host address of the server. If not provided, it defaults to the `IPv4` of the network currently connected to. When connecting from Linkora apps, you should pass this address instead of `localhost`.
92
+
- `LINKORA_SERVER_PORT`: The port number on which the server runs. If not provided, defaults to `45454`.
fun Application.configureRouting(serverConfig:ServerConfig, markdownManagerRepo:MarkdownManagerRepo) {
@@ -45,7 +47,7 @@ fun Application.configureRouting(serverConfig: ServerConfig, markdownManagerRepo
45
47
} else {
46
48
""
47
49
}
48
-
val requiredHtml = markdownManagerRepo.getRawHtmlBasedOnMD(
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(
49
51
fileLocation ="/raw/SERVER_IS_CONFIGURED.md", placeHolder ="#{PLACEHOLDER_1}" to placeHolderValue
50
52
)
51
53
call.respondText(contentType =ContentType.Text.Html, text = requiredHtml)
Copy file name to clipboardExpand all lines: src/main/resources/raw/SERVER_IS_CONFIGURED.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,4 @@
1
-
It seems you've correctly configured the sync server.
2
-
3
-
Before anything, check out this video where I explained how to connect the app and the server. That should clear up most things.
1
+
It seems you've configured the sync-server correctly; to check if it's running, browse to this endpoint or refresh—if the page loads again, the server is up; ensure the connected database is also running.
4
2
5
3
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.
6
4
@@ -37,7 +35,14 @@ This server is meant to communicate only with the **[Linkora](https://github.com
37
35
- 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.
38
36
39
37
## 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
+
-Always go through the [README](https://github.com/LinkoraApp/sync-server/blob/master/README.md); it covers most of the info you're probably looking for.
39
+
-If something isn’t covered here, go through **[GitHub issues](https://github.com/LinkoraApp/sync-server/issues)**; you might find the solution there.
42
40
- 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.
41
+
- You can also [join the Discord](https://discord.gg/ZDBXNtv8MD) if you want. It’s there for questions, updates, or just to hang out.
42
+
43
+
---
44
+
#### Workflow of Linkora, which should make it easier to understand how everything works:
0 commit comments