UNPKG

228 BJavaScriptView Raw
1// proxy - HTTP proxy server
2
3const http = require('http')
4const pickup = require('../')
5
6http.createServer((req, res) => {
7 http.get('http:/'.concat(req.url), (feed) => {
8 feed.pipe(pickup()).pipe(res)
9 })
10}).listen(8080)