Swift on the server with Kitura
Kitura is one of the server-side Swift web frameworks out there. I’ve found that working with Swift in both iOS app development and back-end development is making development easier all around. I only have to focus on the logic of the software and it ends up allowing me to code faster. Kitura also has a lot of supporting packages to make it easier for developers to build cloud-native applications. One package that really stood out to me during this process was Swift-Kuery-ORM. It’s an Object Relational Mapping library that’s built for Swift. The library makes it easy to connect your Kitura server with a SQL database. It uses Codables for the data models that make your RESTful APIs with Kitura simpler. This also allowed me to use the same Codables in both my iOS app and its server.
Try it now with Kitura on Kubernetes!
Kubernetes is already one of the popular container-orchestration platforms for developers who work with containers. In this new pattern, “Kitura on Kubernetes,” I walk you through building a server-side Swift with Kitura to create a step-tracking app that rewards users with “fitcoins.” This pattern uses three simple Kitura microservices that are connected to a PostgreSQL database for its persistence storage. This helps developers expose their back end for their iOS apps to communicate with. You also learn how to expose the back end in Kubernetes to a public domain with a TLS certificate for HTTPS.
Check out the GitHub repo and contribute
Kitura is open source and available on GitHub at IBM-Swift/Kitura. And all of the packages and tools can also be found on that organization. If you want to improve something or give feedback, feel free to open issues and/or pull requests!