인프런 커뮤니티 질문&답변
서버(백앤드)에서 다른 서버로 요청 관련 질문입니다.
작성
·
130
0
express에서는 프론트에서 백앤드로 요청하는것과 동일하게 짰고 잘 작동했습니다.
router.post("/add", async (req, res) => {
const { videoId, category, tags } = req.body;
const ENDPOINT = getEndpointFromVideoId(videoId);
try {
if (!videoId) {
return res.status(404).send(ADD_YOUTUBE_VIDEO_FAIL.ko);
}
const response = await axios.get(ENDPOINT);
const result = getVideoDataFromVideoId(response.data, true);
// 중략....
nest.js는 express 노드버드 구조랑 다소 다른 것 같은데, 다른 서버로 데이터 요청 시 방법은 동일하게 쓰면 되는건가요?




