인프런 커뮤니티 질문&답변
baseURL을 http://localhost:3000/sample/ 처럼 할 수 있나요?
작성
·
343
1
baseURL을
http://localhost:3000/sample/ 처럼 할 수 있나요?
상황)
저의 경우 url이 아래와 같습니다.
http://localhost:3000/sample/signup
http://localhost:3000/sample/login
http://localhost:3000/sample/error
baseURL이
http://localhost:3000 이면,
API 호출할 때
axios.get('/sample/signup');
axios.get('/sample/login');
axios.get('/sample/error');
처럼 해야되는데,
/sample 이 중복이어서,
/sample까지 baseURL로 하고 싶은데,
어떻게 구현할 수 있을까요?






어이쿠 ^^;;;
강의 끝까지 보고, 질문하겠습니다.
감사합니다!!! ^^