題目可能說的不清楚,先上個圖:紅框中的配置只是將views作為動態渲染模板的目錄,所以只能訪問views文件夾下的頁面,現在需要在views下面建立多個文件夾,比如:現在不僅要訪問plan_detail.html和sale_net.html還要能訪問project1和project2中的頁面。比如訪問plan_detail.html地址欄直接是localhost:3000/plan_detail訪問project1中的頁面就是localhost:3000/project1/pageName主文件(index.js)里應該怎么修改呢?下面附上主文件代碼:
node如何配置多個views目錄?
偶然的你
2018-09-14 14:12:50