com-lihaoyi/cask

example project returns "/" as document not HTML

yatesco opened this issue · 4 comments

Hi - I downloaded the example "TodoMVC Full Stack Web" example project following the link (https://github.com/lihaoyi/cask/releases/download/0.7.8/todo-0.7.8.zip) from https://com-lihaoyi.github.io/cask/#todomvc-api-server and then ran ./mill app.run.

Visiting http://localhost:8080 gives:

image

image

I'm just reading the docs so I don't really know how to fix it, hence no PR.

Thanks!

It's not super well documented. This sets the mime type for javascript. Am guessing you'd need to set mime type for the html

https://github.com/OpenResult/caskscalajs/blob/master/server/src/Server.scala

@Quafadas That's only relevant for static files.
The issue seems to be that TypedTag is supposed to set the content type

override def httpContentType = Some("text/html")

but this doesn't work and instead you always get text/plain.

Should be fixed by c9ee4bb

thanks @lihaoyi