https://github.com/hexagontk/websockets_chat
Example demonstrating the use of Web Sockets to create a simple chat application
https://github.com/hexagontk/websockets_chat
example gradle jvm kotlin websockets
Last synced: 11 months ago
JSON representation
Example demonstrating the use of Web Sockets to create a simple chat application
- Host: GitHub
- URL: https://github.com/hexagontk/websockets_chat
- Owner: hexagontk
- Created: 2023-07-21T20:14:01.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-02T17:36:28.000Z (almost 2 years ago)
- Last Synced: 2025-01-22T05:43:04.153Z (about 1 year ago)
- Topics: example, gradle, jvm, kotlin, websockets
- Language: Kotlin
- Homepage: https://hexagontk.com
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gradle Starter Application
This is a Hexagon service created from a template.
## Software Requirements
To build the application you will need:
* JDK 11+ for compiling the sources.
* An Internet connection to download the dependencies.
To run the application:
* For the Gradle distribution: JRE 11+ is required (JDK is not required at runtime).
* For the jpackage bundle: any major OS will run it (Alpine Linux causes problems).
* To run the native executable there is no specific requirements.
## Development
* Build: `./gradlew build`
* Rebuild: `./gradlew clean build`
* Run: `./gradlew run`
* Test (*\*Test*): `./gradlew test`
* Integration Test (*\*IT*): `./gradlew verify`
* Test Coverage: `./gradlew jacocoTestReport`
* Run Container (after assemble): `./gradlew dockerBuild && docker-compose up -d`
The reports are located in the `build/reports` directory after building the project.
## Gradle Wrapper Setup
You can change the Gradle version in `gradle/wrapper/gradle-wrapper.properties`.
## Docker
To generate the Docker images, you can use the `dockerBuild` Gradle task: `./gradlew dockerBuild`.
After that you can start the whole service stack executing: `docker-compose up -d`.
## Usage
After building the project (`./gradlew build`), archives with the application's distributions are
stored in `build/distributions`.
To install the application you just need to unpack one distribution file.
After installing the application, you can run the application executing the `bin/gradle_starter`
script.
Once the application is running, you can send a request executing:
`curl http://localhost:9090/text`
## Native Image
```bash
./gradlew -P agent test
./gradlew nativeCompile
# Executable
build/native/nativeCompile/gradle_starter
# Memory
ps -o rss -C gradle_starter
```