NEXT_PUBLIC과 PRIVATE #90
gayeong0916
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
PRIVATE_API_BASE_URL을 환경변수로 추가함으로써 빌드를 성공했는데
정적 생성을 하려면
const serverApiClient: AxiosInstance = axios.create({
baseURL: process.env.PRIVATE_API_BASE_URL,
headers: {
'Content-Type': 'application/json',
},
}) 이런 코드가 필요한데
-> PRIVATE_API_BASE_URL을 따로 선언한 코드가 없음에도 불구하고 정적 생성 함수를 빌드할 때 에러가 나지 않는다
-> 그럼 서버가 알아서 PUBLIC 빼고 생각해주냐? -> 그건 모름(근데 아마도 아닌 거 같음)
-> 그럼 도대체 서버는 어디서 API_BASE_URL을 들고와서 빌드처리를 한 걸까?
*** 이거에 대해 아시는 분...**
Beta Was this translation helpful? Give feedback.
All reactions