-
Coroutine & Non-blocking
-
R2dbc
-
Websocket url without Kafka
-
If running on a local server
ws://localhost:8080/v1/api/chat
-
Note) /chat consists of connections only within one server without kafka.
-
-
-
Websocket url Including Kafka
-
If running on a local server
-
ws://localhost:8080/v1/api/messages/{group}
-
e.g)
ws://localhost:8080/v1/api/messages/food_topic
ws://localhost:8080/v1/api/messages/food_topic
-
-
-
Note) Swagger does not support WebSockets
-
Change parameters in
src/main/resources
andplugin/src/test/resources/kafka-config-map.conf
-
You don’t have to create a matching Database. Just connect to your db and fill
src/main/resources/application.conf
>ktor.deployment.db
-
-
Install Docker
-
Run kafka server infrastructure using
docker compose up
-
For local
-
Enter the command into bash or powershell depending on your operating environment.
// Running it directly ./gradlew runDocker
// Builds and publishes a project's Docker image to a local registry. ./gradlw publishImageToLocalRegistry
-
-
For cloud deployment
-
Set aws environmental variables and github actions secrets in
.github/workflows/aws.yml
-
git push or run github actions manually
-
-
docker compose up -d
-
Post a user
-
Login via /login path to acquire
Authorization
key -
Set
Authorization
key toAuthorization
header-
Don’t forget the prefix `Bearer `
-
e.g)
Bearer eyJhbGciOiJIU….
-
-
Now you can access every apis and websocket!
-
websocket url e.g) ws://localhost:8080/chat
-
connections // Shows the number of connections (/chat path)
bye // command for disconnect
did you still alive? // It is not a server-side command, but written in mock client test code in `src/test/kotlin/com/aftertime/ApplicationTest.kt`.
https://holy-tungsten-cc5.notion.site/56c389c4552947af99edb88239ad7e56?v=321dc448197244fcb3d515c811714d77&pvs=4