var express = require('express')
var app = express()
var proxy = require('http-proxy-middleware')
var options = {
target: 'https://www.jianshu.com',
changeOrigin: true,
ws: true,
pathRewrite: {
'^/api': '/'
}
}
var exampleProxy = proxy(options)
app.use('/api', exampleProxy)
app.use(express.static('public'))
app.listen(3000, () => console.log('Example app listening on port 3000!'))