aboutsummaryrefslogtreecommitdiff
path: root/routes/meetingpointProxy.js
blob: b2b51c9398e7ea221bca5f2eb5ae0d7d1f8efa07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var express = require('express')
var router = express.Router()
const request = require('request')

/* GET home page. */
router.get('/:url', function (req, res, next) {
  const url = `http://www.meetingpointmco.nl/${req.params.url}`
  request(url, function (err, data) {
    if (err) {
      next(err)
      return
    }
    res.status(data.statusCode).end(data.body)
  })
})

module.exports = router