diff --git a/traque.js b/traque.js index 4f549a0..3252146 100644 --- a/traque.js +++ b/traque.js @@ -90,7 +90,10 @@ var server = http.createServer(option, function(req, res){ res.writeHead(404, {'Content-Type': 'text/html'}); return res.end("404 Not Found"); } - res.writeHead(200, {'Content-Type': 'text/html'}); + if(filename.endsWith('.js')) + res.writeHead(200, {'Content-Type': 'text/javascript'}); + else + res.writeHead(200, {'Content-Type': 'text/html'}); res.write(data); return res.end(); });