Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robarcoo/exposedh2ktorserver
A simple Ktor server app using Exposed, H2
https://github.com/robarcoo/exposedh2ktorserver
exposed h2-database kotlin ktor ktor-server
Last synced: about 2 months ago
JSON representation
A simple Ktor server app using Exposed, H2
- Host: GitHub
- URL: https://github.com/robarcoo/exposedh2ktorserver
- Owner: robarcoo
- Created: 2024-03-01T06:26:57.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-15T05:27:14.000Z (10 months ago)
- Last Synced: 2024-03-15T06:30:18.068Z (10 months ago)
- Topics: exposed, h2-database, kotlin, ktor, ktor-server
- Language: Kotlin
- Homepage:
- Size: 543 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Exposed H2 Ktor Server
This project is a simple Ktor Server that used Exposed and H2 to store data sent from client-side.
Running Application.kt will start a server that saves data in database on computer, so after stopping server data is saved and can be retrieved later. Server includes working with multiple entities, one-to-many relationship, GET-requests, POST-requests (that adds and saves new data on the server), PUT-requests (updates old data and saves it), DELETE-requests (removes old data).
Test data is added when creating server however when adding new data H2 has id conflict because it starts from 1 even if some data is present in the table. Requests don't return any text, just success or fail HTTP respose code.