如何加载以.js显示的.csv文件中包含的.css和Node.js文件?(没有像Express这样的框架)
例如<script src="clock.js"></script>
在Firefox中,它显示页面fs.readFile('./index.html')请求clock.js、jquery.js等作为html文件,这可能是因为response.writeHead是text/html。
有没有办法:
if file included in index.html = .js
set writeHead to application/ja