강의

멘토링

커뮤니티

Inflearn Community Q&A

wayinwayne's profile image
wayinwayne

asked

Node and React series that you can learn by following - Basic lecture

Node React Basics Lecture #22 CORS Issue, Proxy Setting

proxy is not a function 에러가 그래도 해결이 안되시는 분들

Resolved

Written on

·

345

8

저처럼 proxy is not a function

에서 다른 질문들의 해결방법으로 나온

module.exports = function(app) {
app.use(
'/api',
createProxyMiddleware({
target: 'http://localhost:5000',
changeOrigin: true,
})
);
};

이렇게 변경해도 안되시는 분들은 createProxyMiddleware 선언하실때 {}를 빼보세요! 전 그랬더니 되네요

const { createProxyMiddleware } = require('http-proxy-middleware');
const createProxyMiddleware = require('http-proxy-middleware');
reactnodejs

Answer 2

0

감사합니다!!

0

John Ahn님의 프로필 이미지
John Ahn
Instructor

좋은 정보주셔서 감사합니다 !!!!

wayinwayne's profile image
wayinwayne

asked

Ask a question