Side note: if this is going to be publicly facing you’d probably be better off with a battle-tested file server that has more robust path sanitizing, support of range requests, etc. E.g. you could run nginx, have it serve static files, then reverse proxy anything to julia that needs to be.
That said, Content-Type is just passed as a header.
HTTP.Response(200,
["Content-Type" => "application/javascript"],
read(path))
HTTP.jl doesn’t have anything built-in to map file extensions to mimetypes, but e.g. you could start with a list like this one from python mapping commonly used extensions.