비동기적으로 파일 내용 전체를 읽습니다. 이 메소드를 실행할 때에는 인자 세 개를 넘길 수 있다.
fs.readFile('test.txt', 'utf8', (err,data) => {
if(err) {
throw err;
}
console.log(data);
});
let url = "https://v1.nocodeapi.com..."
fetch(url)
.then((response) => response.json())
.then((json) => console.log(json))
.catch((error) => console.log(error));