https://kotlinlang.org logo
#ktor
Title
# ktor
j

Jorge R

08/01/2020, 2:52 PM
Hi all I've shared a small demonstration project in Github about a basic Ktor API server with a clean architecture. I would really appreciate some feedback about it. It is handling multiple environment configurations, content negotiation, jwt authentication and database connection. It is also including docker compose deployment file to be plug and play. Right now I'm working in creating test examples for each layer. I hope you like it and it can be helpful for those starting with this amazing tool. I'm open so solve doubts and help if you start your project following this architecture. Thank you! https://github.com/mathias21/KtorEasy
🎉 1
s

Sam

08/03/2020, 10:54 AM
Do you have any blog to explain your code ? Thanks.
j

jorge.rego

08/03/2020, 11:53 AM
Hi @Sam I’ve written a post in Medium about it. You can find it here: https://medium.com/@math21/architecture-proposal-to-build-servers-with-ktor-1069bfaf2926 Also I’m starting to write a series of articles about how to test this architecture. This is work in progress
🎉 1
s

Sam

08/03/2020, 12:16 PM
Thanks, Im reading it now
😍 1
@jorge.rego: Can you write a article to guide deploy to Google Cloud + MariaDB? and migration ? Thanks.
j

Jorge R

08/05/2020, 8:44 PM
Well, I don't have it deployed to GCloud, so it is not sure I will write one about that. MariaDB is already included in the docker compose in the Github project, that is something you can check from there. I'm still working in finishing the testing articles. After that I will (most likely) write one about deployment and how to integrate metrics with Grafana. I guess GCloud will have to wait...
🎉 1
s

Sam

08/07/2020, 4:48 AM
Thanks, clap for medium and start for Github project
🙇‍♂️ 1
j

ja.son

08/11/2020, 6:15 AM
Is there a video of the process of building this code by git clone, running it and testing it? It's very necessary.
s

Sam

08/11/2020, 6:17 AM
In my opinion, I think read a article better than video.
j

jorge.rego

08/12/2020, 7:54 AM
The process to run this code is explained in README in Github. Once you have Docker installed and running, you build the container with the .sh file and then you run your docker compose with the following command: docker-compose up Once this finishes, your server will be listening in http://localhost:3510/ You can check it works by getting static content: http://localhost:3510/static/ktor_logo.svg