Skip to content Skip to sidebar Skip to footer

Node.js Blocking Bootstrap?

I am fairly new to Node.js and JavaScript in general, but I want to build a website using as little overhead as possible. I want to achieve this with Node.js and Bootstrap. This is

Solution 1:

Your regex doesn't match your CSS filename, so it's serving up index.html instead of the actual CSS.

Because you're using the .min.css file, you need to look for . in the filename, other than before the extension:

if(/^\/[a-zA-Z0-9\/.]*.css$/.test(request.url.toString())){
//                 ^

The same applies to your JavaScript one too.

Post a Comment for "Node.js Blocking Bootstrap?"