node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

bootstrap-router

Bootstrap Router Build Status

Simple drop in module to serve bootstrap files with your express server.

Requirements
  • Node
  • Express 4.8.0+
Dependencies
  • Bootstrap

Installation

npm install --save bootstrap-router

Usage 1

If you mount bootstrap-router on the "/bootstrap" path it will provide the following routes.

/css/bootstrap.css
/css/bootstrap.css.map
/css/bootstrap.min.css
/css/bootstrap-theme.css
/css/bootstrap-theme.css.map
/css/bootstrap-theme.min.css
/bootstrap/js/bootstrap.js
/bootstrap/js/bootstrap.min.js
/bootstrap/fonts/glyphicons-halflings-regular.eot
/bootstrap/fonts/glyphicons-halflings-regular.svg
/bootstrap/fonts/glyphicons-halflings-regular.ttf
/bootstrap/fonts/glyphicons-halflings-regular.woff
/bootstrap/fonts/glyphicons-halflings-regular.woff2

Example

// First require the bootstrap router. 
var bootstrapRouter = require('bootstrap-router');
 
// Note - You can mount this router on any unused path in your application. 
// This example is using "/bootstrap" as the mount point. 
 
// Then mount the router on your desired mount point. 
app.use('/bootstrap', bootstrapRouter);