HyunJungC Blog

  • Table of Contents
  • Overview
  1. 1. app.js 코드
    1. 1.1.
      1. 1.1.1.

Hyun Jung

39 posts
12 categories
0%

Express Framework 기본 이해하기 app.js

Posted on 2021-06-28 In TIL/JavaScript

app.js 코드

1
2
3
4
5
6
7
8
9
10
11
12
13
14
const fetchTodos = () => {
const xhr = new XMLHttpRequest();
xhr.open('GET', '/todos');
xhr.send();

xhr.onload = () => {
if (xhr.status === 200) {
console.log(JSON.parse(xhr.response));
setTodos(JSON.parse(xhr.response));
} else {
console.error('Error', xhr.status, xhr.statusText);
}
};
};

Express Framework 기본 이해하기 - server.js
Math 내장 객체의 Property와 Method
© 2021 Hyun Jung
Powered by Hexo & NexT.Muse