我在node.js中的express中使用static中间件为static(__dirname+'/public'),html中的代码为
我想问一下base标签中的href属性为'/'是什么意思?不是一般都为http...这种属性值么?
ringa_lee
app.use(express.static(__dirname+'/public'));This line of code is to set the base_url of your static resourceSo in the page <base href="/"> / represents what you set Static resource path
app.use(express.static(__dirname+'/public'));
This line of code is to set the base_url of your static resource
So in the page <base href="/"> / represents what you set Static resource path