Open tqma113 opened 3 years ago
As the title, in express it is supported by option of express.static like
express.static
const express = require('express'); const server = express(); const oneHour = 3600000; // 3600000msec == 1hour server.use(express.static('www', { maxAge: oneHour })); // Client-side file caching server.get('/', function(req, res) { res.sendFile(__dirname + '/index.html'); }); server.listen(3000);
It makes sense. I will going to add this feature for http.serve
http.serve
As the title, in express it is supported by option of
express.static
like