jean-paul06/18/2023, 4:09 AM
I put the list inside the class, and got an error about not being able to infer type variable V when doing the mapOf in
Inside Article.kt, let's create a mutable list for storing articles and add the first entry:
It wasn't until I tracked down the sample code in github that I figured it out. Maybe say to not put it in the class, or show the creation of the map in the context of the whole file, or maybe add links to docs that point to the relevant demo project files for easy reference?
call.respond(FreeMarkerContent("index.ftl", mapOf("articles" to articles)))