How can I use Twitter Bootstrap on Node.js and Express?
I know that I have to put CSS and Javascript files in the ./public directory (if it is installed by default). But when I look at how to use Twitter Bootstrap on Node.js and Express, I find out that there are many options for using Twitter Bootstrap.
For example, just put the boot CSS files and JS files in the appropriate directories or specify:
<link rel='stylesheet' href='assets/css/bootstrap-responsive.css'> <link rel='stylesheet' href='https://d396qusza40orc.cloudfront.net/startup%2Fcode%2Fbootstrap.js'>
etc., and also there are two sources: regular and .min.css file, each with CSS and JS. So, how can I serve the corresponding Bootstrap file in Node.js and Express?
Here are the first few lines of my current code (is this necessary?), Which doesnβt work with a responsive design (it doesnβt fold vertically when I narrow the screen to simulate the size of smartphones, but instead just scale down the size with each ratio the same) .
<!DOCTYPE html> <html lang='en'> <head> <meta charset='utf-8'> <title><%= title %></title> <meta name='viewport' content='width=device-width, initial-scale=1.0'> <link rel='stylesheet' href='/stylesheets/bootstrap.min.css'> <link rel='stylesheet' href='assets/css/bootstrap-responsive.css'> <script src='/javascripts/jquery-2.0.2.min.js'></script> <style type='text/css'> @media (min-width: 980px) { body { padding-top: 60px; } } @media (max-width: 480px) { body { padding-top: 30px; } } </style> </head>
source share