I\'m currently experiencing some minor problems with serving static files through expressJs.
My directory structure is as following:
You should use path.join instead of manually concatening path components. It uses path.normalize, which resolves . and .., handles multiple or trailing slashes, and uses the appropriate file separator for your platform (see: path.sep).
For example,
var path = require('path');
var express = require('express');
var app = express();
app.use(express.static(path.join(__dirname, '../public')));