我想在hapiJS的res.response()中包含我的本地CSS / JavaScript文件。我无法加载本地文件。如何在Hapi的响应中加载我的本地文件?如何指定目录名?
module.exports = function (req, res) {
Router.run(routes, req.url.path , function (Handler) {
var content = React.renderToString(React.createElement(Handler, { state: '' }));
var head = <link href="/css/app.caz.css" rel="stylesheet"/></script> <script src="js/app.caz.js"></script>;
var page = ` <!DOCTYPE html> <html> ${head} <body> </body> </html>`;
res.response(page);
});
};