API를 배웠는데 작업 할 때 외에는
따로 연습 할 방도가 없어 구글링 했더니
JSONPlaceholder가 두둥!
1. Node.js 설치!
Node.js
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
nodejs.org
2. 서버 설치!
npm install -g json-server
3. 서버 실행
json-server --watch db.json
db.json을 DB로 삼아 서버를 실행한다는 의미인데
db.json으로 로딩 했을 때 파일이 없을 경우 새로 생성해준다.
또 Json으로 된 리소스들이 주어진다.
4. localhost:3000으로 접속!
※ 데이터 추가!
공식사이트
JSONPlaceholder - Free Fake REST API
{JSON} Placeholder Free fake API for testing and prototyping. Powered by JSON Server + LowDB As of Dec 2020, serving ~1.8 billion requests each month.
jsonplaceholder.typicode.com
귀찮으면 이거로 덮어씌워..
참고: dundun-dev.tistory.com/11?category=724478
REST API 간단한 테스트 서버 만들기 - JSONPlaceholder
REST API 테스트를 해보려고 하지만 마땅한 서버가 없다. 그래서 구글링을 통해 검색을 통해 좋은 것을 찾아 보았다. Node.js를 이용한 간단한 Json 서버이다. 1. Node.js 설치하기 https://nodejs.org/ko/ Node.j.
dundun-dev.tistory.com