它在Mac上運行。Node.js的索引頁不讀取css或javascript文件
所有的文件在庫/網絡服務器/文件/。
當我運行節點index.js,代碼:
<link rel="stylesheet" href="css/style.css" /> returns: {
Failed to load resource: the server responded with a status of 404 (Not Found)
}
不過,如果我打開HTML文件時,它讀取的一切。
背後有什麼醜陋的蟲子?
一塊代碼的根導演:鏈接的rel =「樣式表的」 href =「CSS/style.css中「 –
你能否提供'index.js'文件中的代碼?否則難以提供幫助。 –