Pug文件没有加载CSS

Hum*_*ons 2 css node.js express pug

我有一个快速项目设置.我正在使用Pug作为视图引擎.

我的app.js中有以下几行,

app.set('views', path.join(__dirname, './views'));
app.set('view engine', 'pug');
app.use(express.static(path.join(__dirname, './public')));
Run Code Online (Sandbox Code Playgroud)

我在index.pug视图中有以下内容,

    link(rel='stylesheet', href='/stylesheets/style.css', type='text/css')
    link(rel='stylesheet', href='/stylesheets/boostrap.min.css', type='text/css')
Run Code Online (Sandbox Code Playgroud)

CSS文件位于正确的文件夹(公共/样式表)中,但是当我加载应用程序时,视图似乎不会加载CSS文件.

可以在此处找到包含其目录和所有代码的完整项目

wor*_*orc 6

Typo在你的bootstrap链接中,你有boo s陷阱:

link(rel='stylesheet', href='/stylesheets/boostrap.min.css', type='text/css')
Run Code Online (Sandbox Code Playgroud)