Jump to content

Script modification to relocate json file


troshan

Recommended Posts

You dont need to modify it. You need to pass the path to your db.json on startup. As Quoted from the github.

 

 

Start JSON Server

$ json-server --watch db.json

Change --watch db.json to something like  --watch /full/path/to/db.json  or use relative path eg  --watch ../db.json 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.