homepage.js/middleware/index.js

23 lines
535 B
JavaScript
Raw Normal View History

2023-02-19 03:32:25 +01:00
const express = require('express');
const router = express.Router();
2023-03-17 13:42:16 +01:00
2023-03-05 15:26:56 +01:00
const minify = require('express-minify');
2023-03-19 10:18:34 +01:00
const browser = require('express-browser-detect');
2023-02-19 03:32:25 +01:00
2023-03-17 13:42:16 +01:00
// custom
2023-03-05 14:56:16 +01:00
router.use(require('./template'));
router.use(require('./cookie'));
2023-02-25 07:33:13 +01:00
router.use(require('./session'));
router.use(require('./session_back'));
2023-02-19 03:32:25 +01:00
2023-03-17 13:42:16 +01:00
// libs
2023-03-05 15:26:56 +01:00
router.use(minify({
cache: process.env.APP_DEBUG == true,
uglifyJS: null,
errorHandler: console.error,
css_match: /.css^/,
js_match: /.js^/
}));
2023-03-19 10:18:34 +01:00
router.use(browser);
2023-03-17 13:42:16 +01:00
2023-02-19 03:32:25 +01:00
module.exports = router;