Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thilux/kblog
Small blog REST application developed in Kotlin using KTor framework
https://github.com/thilux/kblog
database kotlin ktor ktor-framework rest-api restapi restful restful-api squash
Last synced: about 5 hours ago
JSON representation
Small blog REST application developed in Kotlin using KTor framework
- Host: GitHub
- URL: https://github.com/thilux/kblog
- Owner: thilux
- License: apache-2.0
- Created: 2017-12-17T00:24:07.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-07-30T05:49:37.000Z (over 3 years ago)
- Last Synced: 2023-03-01T14:25:49.313Z (over 1 year ago)
- Topics: database, kotlin, ktor, ktor-framework, rest-api, restapi, restful, restful-api, squash
- Language: Kotlin
- Size: 85 KB
- Stars: 14
- Watchers: 2
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kBlog
This is a very simple project using kotlin's next hot thing, framework KTor.
The project provides a set of APIs for a blog where one can create posts and comments for the posts.
I intend to enhance this project as I learn more about Kotlin and KTor. For this initial version, please check the stack information below:
The solution is heavily based on the following sample projects found on GitHub or blogs online:
- [Simon Wirtz Ktor application REST application sample](https://github.com/s1monw1/ktor_application)
## Solution Stack
- Using Netty as the server engine
- All services are JSON based REST services
- H2 in memory database using [Squash](https://github.com/orangy/squash) as the persistence layer
- SLF4J is used for logging.
- No security implemented so far.## Building & Running
This project uses gradle for dependency management and build. To build the project, run the following command:
```
gradle build
```For running the server the project, first, you need to create environment variable PORT with the number of the port in which you wish to kblog to listen to.
```$> export PORT=8080```
Then:
```
gradle run
```## Branches
The repository is divided in the following branches, each being incremental to the previous in terms of features:
- **part1:** Implementation with no database, storing data in runtime memory (available)
- **part2:** Implementation of database handling for real persistence on database (planned)
- **part3:** Implementation of JWT security (planned)