Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
NuxtJS server middleware proxy pass example
const httpProxy = require('http-proxy')
const proxy = httpProxy.createProxyServer()
const API_URL = process.env.API_URL || ''
export default function(req, res, next) {
proxy.web(req, res, {
target: API_URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.