From 330dd83731125595bbd90c96a17e2a8c46468e8d Mon Sep 17 00:00:00 2001 From: Victor Pillac Date: Thu, 18 Jun 2020 16:39:47 +1000 Subject: [PATCH] Add support for custom routes See https://github.com/typicode/json-server#add-custom-routes --- run.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 6af0f54..a916071 100755 --- a/run.sh +++ b/run.sh @@ -7,7 +7,13 @@ args="$@ -p 80" file=/data/db.json if [ -f $file ]; then echo "Found db.json, trying to open" - args="$args db.json" + args="$args --watch db.json" +fi + +file=/data/routes.json +if [ -f $file ]; then + echo "Found routes.json, trying to open" + args="$args --routes routes.json" fi file=/data/file.js