diff options
author | Noah Loomans <noahloomans@gmail.com> | 2016-09-04 22:17:14 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2016-09-04 22:17:14 +0200 |
commit | fd7262bebcd6aff7e3ad229bd9e737816a2b23bc (patch) | |
tree | 6b82b7ee03e6d4c3083aff436cf2a9543af46a2a /routes/meetingpointProxy.js |
Init commit
Diffstat (limited to 'routes/meetingpointProxy.js')
-rw-r--r-- | routes/meetingpointProxy.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/routes/meetingpointProxy.js b/routes/meetingpointProxy.js new file mode 100644 index 0000000..1b70beb --- /dev/null +++ b/routes/meetingpointProxy.js @@ -0,0 +1,14 @@ +var express = require('express') +var router = express.Router() +const Promise = require('bluebird') +const request = Promise.promisify(require('request')) + +/* GET home page. */ +router.get('/:url', function (req, res, next) { + request(`http://www.meetingpointmco.nl/${req.params.url}`) + .then(raw => raw.body) + .then(body => { res.end(body) }) + .catch(next) +}) + +module.exports = router |