728x90
반응형
1. 설치
npm i json-server
2. 응답 데이터 파일 만들기(db.json)
프로젝트 루프 폴더에 db.json 파일을 생성합니다.
그리고 아래의 데이터를 저장해 줍다.
{
"posts": [
{ "id": 1, "title": "json-server", "author": "typicode" }
],
"comments": [
{ "id": 1, "body": "some comment", "postId": 1 }
],
"profile": { "name": "typicode" }
}
3. 이후 사용법은 아래글 참고
728x90
반응형
'IT > JSON' 카테고리의 다른 글
Json Beautifier 사이트 (0) | 2023.11.07 |
---|---|
깃헙 JsonPath (0) | 2023.11.07 |
String을 JSON 맵핑시 Unrecognized field.. not marked as ignorable (0) | 2023.05.14 |
JSON 메서드 (0) | 2023.02.13 |
JSON 이란? (0) | 2023.02.13 |
댓글