개발용 서버로 localhost 를 대부분 이용하지만 어쩌다가 한번씩 다른 컴퓨터로 보여줘야할 일이 생기기 시작했다.
이때
$ json-server --watch db.json --port (port number
대신
$ json-server --host x.x.x.x --watch db.json --port (port number)
를 사용한다.
여기에서
x.x.x.x 는 자신의 ip주소를
db.json은 열고자 하는 데이터 파일을
(port number)는 서버의 번호를 뜻한다.