Middleware for minify.
npm i mollify --save
import {fileURLToPath} from 'url';
import {dirname} from 'path';
import http from 'http';
import mollify from 'mollify';
import express from 'express';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const app = express();
const server = http.createServer(app);
const port = 1337;
const ip = '0.0.0.0';
app.use(mollify({
dir: __dirname,
is: true, // default
}));
app.use(express.static(__dirname));
server.listen(port, ip);
MIT