https://github.com/saann3/message-server
Server similar to what social networks do. Can send and receive messages via websocket
https://github.com/saann3/message-server
Last synced: 7 months ago
JSON representation
Server similar to what social networks do. Can send and receive messages via websocket
- Host: GitHub
- URL: https://github.com/saann3/message-server
- Owner: SAANN3
- Created: 2024-06-22T10:30:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-17T22:41:06.000Z (over 1 year ago)
- Last Synced: 2025-02-01T00:34:05.711Z (over 1 year ago)
- Language: Kotlin
- Homepage:
- Size: 111 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Message-server
A server for sending and recieving messages via websocket written in kotlin with ktor. Something similar to social networks
# Docs
If you want to use Swagger, there are api docs on ```[serverUrl]/swagger/index.html``` (for example http://0.0.0.0:8080/swagger/index.html). Documented all routes except websocket one. Also swagger is weird at showing kotlinx instance data type.
There are also same [docs](https://github.com/SAANN3/Message-Server/blob/main/docs/api.md) on GitHub, but also with documented websocket and fixed data types.
# Building on linux
```sh
git clone https://github.com/SAANN3/Message-Server
cd Message-Server/
./gradlew installDist
```
Scheme for database are located in ```./docker/db.sql```.
If you want, you can import it into local installation of postgres(database name should be ```server-message```), but there is also a docker compose file inside ```./docker``` , that sets everything, related to db, up.
# Run server
If you want to start postgres container with already installed scheme and then launch server, connected to docker db
```
./dockerRun.sh
```
Or if you want to run only server, that by default, connects to local database
```sh
./build/install/com.example.message-server/bin/com.example.message-server
```
# TODO
1: test that everything works
2: ~~make a docker container with postgres db~~
3:~~document websocket in GitHub~~ and maybe swagger(probably no)
4: ~~Implement unread messages system~~