Hi all I've shared a small demonstration project i...
# ktor
j
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
Do you have any blog to explain your code ? Thanks.
j
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
Thanks, Im reading it now
😍 1
@jorge.rego: Can you write a article to guide deploy to Google Cloud + MariaDB? and migration ? Thanks.
j
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
Thanks, clap for medium and start for Github project
🙇‍♂️ 1
j
Is there a video of the process of building this code by git clone, running it and testing it? It's very necessary.
s
In my opinion, I think read a article better than video.
j
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