Using HummingbirdFluent with Async/Await #114
-
Is it possible to use the HummingbirdFluent package with async/await from FluentKit? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes you can use hummingbird-fluent with async/await. There is even some example code here https://github.com/hummingbird-project/hummingbird-examples/blob/main/session-persist-async/Sources/App/Controllers/UserController.swift The method |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for your quick reply. I am really liking this framework. Even though Vapor is a good framework I find it overly complex. Hummingbird seems to have made it much simpler. I like the idea of just adding what you need with the extension plugins. |
Beta Was this translation helpful? Give feedback.
Yes you can use hummingbird-fluent with async/await. There is even some example code here https://github.com/hummingbird-project/hummingbird-examples/blob/main/session-persist-async/Sources/App/Controllers/UserController.swift
The method
UserController.create
checks if a user is already in the database and if not creates a new one.