JSON Server

유관희·2022년 5월 14일
0
post-thumbnail
post-custom-banner

🌮 JSON Server

Getting started

Install JSON Server

npm install -g json-server

Create a db.json file with some data

{
"posts": [
{ "id": 1, "title": "json-server", "author": "typicode" }
],
"comments": [
{ "id": 1, "body": "some comment", "postId": 1 }
],
"profile": { "name": "typicode" }
}

Start JSON Server

json-server --watch db.json

Alternative port

You can start JSON Server on other ports with the --port flag:

$ json-server --watch db.json --port 3004

profile
안녕하세요~
post-custom-banner

0개의 댓글