Tutorial using express.static
The express.static middleware let user access a public directory. Continuing from our last tutorial, we add the statement …
app.use(express.static(__dirname + ‘/public’));
And create a public directory with a css directory inside where you can put style.css like so …
Now your stylesheet can be easily access with …
http://localhost:3000/css/style.css