-
Coroutine & Non-blocking
-
IMPORTANT: PORT IS 8080, NOT 8000
-
If running on a local server
ws://localhost:8080/socket?{topic name}
-
e.g) ws://localhost:8080/socket?food_topic
ws://localhost:8080/socket?room1
-
-
-
Note) Swagger does not support WebSockets
-
Modify the file in the path below.
api/Rocket.toml config\src\app_config.rs
-
You don’t have to create a matching Database.
-
-
Turn on the appropriate database feature for your chosen db in
service/Cargo.toml
(the"sqlx-postgres",
line) -
Set aws environmental variables and github actions secrets in
.github/workflows/aws.yml
-
Run kafka server infrastructure using
docker compose up
-
Install Cargo(https://doc.rust-lang.org/cargo/getting-started/installation.html)
-
Execute
cargo run
to start the server -
You can go to
http://localhost:8000/swagger-ui/index.html
to see the api documentation about this demo project.-
Note: WebSocket is binding at port 8080, so you can go to
ws://localhost:8080/socket?{group/topic name}
to connect to the WebSocket about this demo project.
-
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!
-
Note: websocket url e.g) ws://localhost:8080/socket?{group/topic name}
-