2023-05-10 09:42:08 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
args="$@"
|
|
|
|
|
2023-07-05 13:19:42 +00:00
|
|
|
args="$@ --host 0.0.0.0 --port 80"
|
2023-05-10 09:42:08 +00:00
|
|
|
|
|
|
|
file=/data/db.json
|
|
|
|
if [ -f $file ]; then
|
|
|
|
echo "Found db.json, trying to open"
|
|
|
|
args="$args db.json"
|
|
|
|
fi
|
|
|
|
|
|
|
|
file=/data/file.js
|
|
|
|
if [ -f $file ]; then
|
|
|
|
echo "Found file.js seed file, trying to open"
|
|
|
|
args="$args file.js"
|
|
|
|
fi
|
|
|
|
|
|
|
|
json-server $args
|