Q:

Why CSS and Bootstrap elements disappear with node express server? 

I firstly made a basic node server like this:
  var connect = require('connect');

  var serveStatic = require('serve-static');
  connect().use(serveStatic(__dirname)).listen(8080, function() {
    console.log('Server running on 8080...');
  });

Then I replaced it with an express server like this:
   var express = require("express");
   var app     = express();
   var path    = require("path");

   app.get('/',function(req,res){
   res.sendFile(path.join(__dirname+'/index.html'));

   });

   app.use(express.static("public"));

   app.listen(8080);

   console.log("Running at Port 8080");

With the first one, everything worked fine.  CSS, JQuery, images etc..., but with the second one, some of my style elements totally disappeared and it can't reach the pictures on the site.  What did I miss?  How can I solve it? 

A:

You are not serving static files. 
app.use(express.static("public"))

This would serve all files from /public directly on the root of your server /. If you want to serve them at /static you need to modify the code a bit. 
app.use("/static", express.static("public"))

Example
File Structure
├── node_modules
├── package.json
├── public
| └ style.css
|
└── server.js

server.js
var express = require("express")
var app = express()

app.use(express.static("public"))

app.listen(3333)

After running server.js you should be able to access http://localhost:3333/style.css (and every other file in the /public directory)

