I personally prefer functional structure. So you h...
# ktor
o
I personally prefer functional structure. So you have a
main
function which installs all the features, opens
routing
and then calls functions for various parts of the system.
Copy code
public Application.main() {
  install(…) 
  install(…) 
  routing {
      users() // user routes
      articles() // article routes
  }
}

// in other file
fun Route.users() {
   get("users") {…}
}
i
orangy: Seems interesting. But how are the modules structured? Eg. users module?
o
There are plenty of variants, what kind of application are you planning? Lots of endpoints? Few endpoints? Stateful/stateless?
(I will need to go for a while now, will respond later)
i
I'm looking for a structure to experiment with a RESTful JSON api. Nothing too specific, I'm just looking for a way to get started, while doing it properly and keeping it scalable/modular from the beginning. It doesn't have to be a perfect fit, I can adapt a structure to my needs