troshan Posted June 30, 2015 Share Posted June 30, 2015 Im having issue with uloading following into heroku host as db.json located outside of the 'json-server' directory https://github.com/typicode/json-server/ How and where should I modify this script to move the db.json into 'json-server' dirctory Quote Link to comment https://forums.phpfreaks.com/topic/297106-script-modification-to-relocate-json-file/ Share on other sites More sharing options...
Ch0cu3r Posted June 30, 2015 Share Posted June 30, 2015 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 Quote Link to comment https://forums.phpfreaks.com/topic/297106-script-modification-to-relocate-json-file/#findComment-1515259 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.