bin/routes/main.js

15 lines
392 B
JavaScript
Raw Normal View History

2023-03-04 02:09:05 +01:00
const express = require('express');
const router = express.Router();
const handler = require('express-async-handler');
2023-03-04 06:00:53 +01:00
const content = require('../helpers/content');
2023-03-04 02:09:05 +01:00
async function index(req, res) {
2023-03-04 06:00:53 +01:00
res.render('main', {
maxlen: process.env.MAXLEN,
exceeded: content.submitted() >= process.env.MAXFILES
});
2023-03-04 02:09:05 +01:00
}
router.get('/', handler(index));
module.exports = router;