I setapp.use(express.static(path.join(__dirname, 'public'))); in my app.js
and now I use bootstrap.css and myself css file main.css
index.html:
┊ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
┊ <link rel='stylesheet' type="text/css" href='bootstrap/theme/bootstrap.united.css' />
┊ <link rel='stylesheet' type="text/css" href='bootstrap/css/main.css' />
main.css:
1 body {
2 background-color: red;
3 }
and my file's tree is:
public
├── bootstrap
│ ├── css
│ │ ├── bootstrap.css
│ │ └── bootstrap.min.css
│ ├── js
│ │ ├── bootstrap.js
│ │ └── bootstrap.min.js
│ └── theme
│ └── bootstrap.united.css
├── css
│ └── main.css
└── jQuery
└── jquery-1.12.0.min.js
my node server is 127.0.0.1:3000
in my chrome, the bootstrap.united.css can work,
but main.css can not work,
and I can load it in http://10.0.8.88:3000/css/main.css
why main.css has been loaded, but doesn't work?