const express = require('express')
const router = require('express').Router()
const path = require('path')

router.use('/favicon.png', express.static(path.join(__dirname, '../', 'public', 'favicon.png')))
router.use('/static', express.static(path.join(__dirname, '../', 'public')))
router.use('/static', express.static(path.join(__dirname, '../', 'content', 'img')))

router.use('/*.asc', (req, res, next) => {
  res.sendFile(path.join(__dirname, '../', 'keys', `${req.params[0]}.asc`))
})
router.use('/*.pgp', (req, res, next) => {
  res.sendFile(path.join(__dirname, '../', 'keys', `${req.params[0]}.pgp`))
})

module.exports = router
