인프런 커뮤니티 질문&답변
답변 2
1
제로초(조현영)
지식공유자
console 보시면 localhost/user/login이 아직 나옵니다. 배포 후에는 localhost 대신 3.34.125.120이 백엔드 주소가 되도록 설정해야 합니다.
0
terecal
질문자
.env 적용 대신 일단 직접 설정하니까 되는거 같아여
배포 서버에서 세가지를 수정했어여
어쨌든 배포 서버가 돌아가여
수동으로 설정하다가 env 적용도 해보면 될거 같아여
답변 감사합니다
1.port 설정
app.listen(80 , () => {
console.log("Express Server is Excuting");
});
2.
cors 설정
app.use(cors({
origin: ['http://3.34.125.120', 'http://localhost:3000', 'nodebird.com', 'http://3.34.130.207'],
credentials: true,
}));
3.sagas/index.js
axios.defaults.baseURL = 'http://3.34.130.207';
axios.defaults.withCredentials = true;




