Midwest Dev Chat


  • The newest 15 messages in the super-cool #node channel.

  • 09/23 10:44:22 Tenisha: anybody here ever use https://github.com/chimurai/http-proxy-middleware ?
  • 09/23 10:45:28 Tenisha: more specifically, this is being used in an app made from the webpack vue-cli template
  • 09/23 10:45:58 Tenisha: I have an app that I want to serve a mock API on dev
  • 09/23 10:46:06 Tenisha: so I have this block:
        proxyTable: {
          '/wp-json': {
            target: 'localhost:8889',
            changeOrigin: true,
            pathRewrite: (path, req) => path.replace(/^(\/wp-json\/\w{2}\/v\d)/, '')
  • 09/23 10:47:23 Tenisha: so that should look at any url coming from `localhost:8889` that starts with `/wp-json`, and rewrite to an empty string the match for the regex as the first arg to `replace`
  • 09/23 10:47:35 Tenisha: (屮‘Д’)屮 y u no work?!
  • *Usernames have been changed to protect the innocent.
We're currently 973 members strong. Join us!
Request Invite

Check out all the cool channels!

Join the conversation!