Categories
express javascript node.js npm twitter-bootstrap

How can I add Bootstrap to a project in ExpressJS?

I’m developing an aplication using nodejs and the framework Express.
I want to add Bootstrap to my project in local.
I added this to my index <head>

<script language="javascript" src="https://www.faqcode4u.com/faq/570496/node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://www.faqcode4u.com/faq/570496/node_modules/bootstrap/dist/css/bootstrap.min.css"/>

I found that I have to add this code to my app.js

app.use(express.static(__dirname + '../node_modules/bootstrap/dist'));

but it doesn’t works too.
(I have in mind the path of the Bootstrap and use ‘../modules…’ too)