LovellR / GSS_Project

0 stars 0 forks source link

[회의] 약국정보리스트 기능 추가 여부 #37

Closed mina-dong closed 3 months ago

mina-dong commented 3 months ago

기능이 너무 없는거 같아서 약국정보를 추가해볼까 고민을 했습니다...........근데 시도를 조금 해보긴 했는데

fetch('api주소') .then((response)=>response.text()) .then((data)=> console.log(data));

뭔가 이렇게 해서 브라우저 콘솔창에서는 데이터를 가져오는거 같긴한데 xml이여서 그런지 xml-json 모듈을 깔아야하는건지 sever.js에서는 안되서 우선은 보류 하겠습니다 ㅎㅎ

app.get("/Pharmacy", async (req, res) => { try { const response = await axios.get(openApiUrl); res.send(response.data); } catch (error) { console.error('Fetch error:', error); res.status(500).send('Error fetching data from the API'); } });

해당 건은 다른데로 머지 처리할 예정입니다

mina-dong commented 3 months ago

코드 수정 중! 으로 현재 불러오기까지는 되는거 같아 아마 기능 구현할거 같습니다. 혹시 아닌거 같다거나 다른 의견 있는 경우에만 코멘트 달아주세요.(없을 경우 동의로 간주) @san-sae @LovellR 감사합니다.