Version 0.3.3 - Add of links
All checks were successful
Neutral/pipeline/head This commit looks good

This commit is contained in:
Raphix
2023-11-05 12:12:18 +01:00
parent fb053d9897
commit adfb626dd7
11 changed files with 525 additions and 7 deletions

23
routes/link.js Normal file
View File

@ -0,0 +1,23 @@
var express = require('express');
var router = express.Router();
var path = require("path")
module.exports = router;
module.exports.ApplyLinks = class {
constructor(links) {
// Remove all routes
router.stack = []
for(var link of links) {
const url = link.url
router.get("/" + link.dest, (req,res,next) => {
res.redirect(302, url)
})
}
module.exports = router;
}
}