summaryrefslogtreecommitdiff
path: root/lib/web/baseRouter.js
blob: df5e2777bc1332fc4be8ba5bdd09f850bbfb06e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'use strict'

const Router = require('express').Router

const response = require('../response')

const baseRouter = module.exports = Router()

const errors = require('../errors')

// get index
baseRouter.get('/', response.showIndex)
// get 403 forbidden
baseRouter.get('/403', function (req, res) {
  errors.errorForbidden(res)
})
// get 404 not found
baseRouter.get('/404', function (req, res) {
  errors.errorNotFound(res)
})
// get 500 internal error
baseRouter.get('/500', function (req, res) {
  errors.errorInternalError(res)
})