express Handling static files Absolute Path to Static Files Directory Example


Example

// Set up Express
var express = require('express');
var app = express();    

// Serve files from the absolute path of the directory
app.use(express.static(__dirname + '/public'));

// Start Express server
app.listen(3030);