Hey Ktor folks :wave::skin-tone-2: , my team and I...
# ktor
r
Hey Ktor folks 👋🏻 , my team and I are pretty much noobs when it comes to Ktor server, and we're running into what we think should be easy obstacles. We're just not having a whole lot of luck with figuring it out. We're just looking for someone who's got some solid Ktor Server experience (especially with the devops aspect), who can consult with us on some problems. Anyone have a spare 30 minutes to get on a call or DM about some Ktor Server issues? More info in the thread. cc: @Waseem Abbas
🙌 1
The main problems we're facing right now are as follows 1. Configuring the server to run correctly in a CI environment so we can run unit tests 2. Speaking of unit tests, how do those work in Ktor? Samples aren't great on this, and we want some guidance here to better understand how it works 3. We're running into an issue with getting HTTPS setup correctly with our Docker config. Documentation on this seems easy enough, but it's not working 🤷🏻‍♂️
BTW: happy to pay for someone's time too. Not expecting a freebie on this one, since we have a lot going on
c
Are you launching a real server for your unit tests? I have found the fake Ktor server to be very convenient to use for unit tests.
j
Hey @Ryan Simon I've written some articles about testing with unit tests. Maybe you can have a look here: https://medium.com/@math21 Also I can give you a hand if you need, but I'm an Android Developer, not a professional Backend developer ^_^ Let me know if I can help
Are you considering any reverse proxy to deal with SSL in your deployment setup? that way you can get rid of the HTTPS at Ktor level.
c
I have used Caddy as a reverse proxy, the configuration is trivial: docker-compose.yml | docker-compose.prod.yaml (just replace `localhost`by your host name)
👀 2
j
Some comments here: • Unit tests mean layers • Layers means architecture • No clean architecture -> very hard to achieve good unit testing • By using fake Ktor server I guess you are doing more integration tests than unit tests
💯 2
I have used Nginx before, now I've switched to Traefik.
a
we have some experience at 47 Degrees / Xebia Functional on this aspects, you can contact us at https://www.47deg.com/contact/
r
sorry for the very late reply to this. thank you for all your suggestions! as a follow up to the HTTPS piece. again, being a server noob here, why use reverse proxy? it does seem much easier than managing our own HTTPS setup
@Jorge R good call out on the unit tests
🙌 1
c
@Ryan Simon exactly because it's so much easier. You can configure SSL outside of your server itself, meaning you can change it without redeploying, or have multiple deployments with different setups easily. It's also more secure (in case your server is comprised, it doesn't know the private certificate key). If you're using K8s, it's also already a feature of the load balancer.
👆 1
🙏🏻 1