I'm trying to build a simple searching/browsing service for a server and I thought it could be interesting to use Express for that to get familiar with it.
For the problem I'm considering, I have express@3.4.1
and a very simple app.js
:
var express = require("express");
var app = express();
//var express = require('express')
//, app = express.createServer();
app.configure(function() {
var hourMs = 1000*60*60;
app.use(express.static(__dirname + '/public', { maxAge: hourMs }));
app.use(express.directory(__dirname + '/public', {hidden: true, icons: true}));
app.use(express.errorHandler());
});
app.listen(1333);
How can I style/customize the HTML/CSS that the directory
middleware produces?
Should I overwrite express.directory.html
in my app.js
or is there a better/cleaner way?
Edit: After looking at the code it seems overriding the function is not the way to go. The file it uses seems rather hard-coded and I may end up copying the whole file to override what I want. So, any idea?