aboutsummaryrefslogtreecommitdiff
path: root/routes/meetingpointProxy.js
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2016-09-05 19:55:53 +0200
committerNoah Loomans <noahloomans@gmail.com>2016-09-05 19:55:53 +0200
commit0acf4e0774e0daeed2c386e4d9c0ac36da70a244 (patch)
tree839f0db637e379d433f1a82eb23ade74f0569522 /routes/meetingpointProxy.js
parent0bf0cddc5c6c8bce34a9df1e376759eb5773d16b (diff)
you can now search by name
Diffstat (limited to 'routes/meetingpointProxy.js')
-rw-r--r--routes/meetingpointProxy.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/routes/meetingpointProxy.js b/routes/meetingpointProxy.js
index 1b70beb..cec74a8 100644
--- a/routes/meetingpointProxy.js
+++ b/routes/meetingpointProxy.js
@@ -2,11 +2,13 @@ var express = require('express')
var router = express.Router()
const Promise = require('bluebird')
const request = Promise.promisify(require('request'))
+const encoding = require('encoding')
/* GET home page. */
router.get('/:url', function (req, res, next) {
request(`http://www.meetingpointmco.nl/${req.params.url}`)
.then(raw => raw.body)
+ .then(page => encoding.convert(page, 'UTF-8', 'Windows-1252'))
.then(body => { res.end(body) })
.catch(next)
})