Skip to content

Commit

Permalink
new sscweb metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Weigel committed Jan 10, 2019
1 parent 61dceb2 commit 3e6e787
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bin/SSCWeb.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ if (argv.parameters === true || argv.parameters === '') {
var timeonly = true;
}

var json = JSON.parse(fs.readFileSync('metadata/SSCWeb/SSCWeb-info.json', 'utf8'));
var parameters = json.catalog[0].info.parameters;
var json = JSON.parse(fs.readFileSync('metadata/SSCWeb/SSCWeb-catalog.json', 'utf8'));
var parameters = json[0].info.parameters;
if (PARAMETERS[0] !== "Time") {
PARAMETERS.push("Time");
}
Expand Down
8 changes: 5 additions & 3 deletions hapi-server
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
# https://unix.stackexchange.com/a/76518
path=$(exec 2>/dev/null;cd -- $(dirname "$0"); unset PWD; /usr/bin/pwd || /bin/pwd || pwd)

if type $path"/bin/node" &> /dev/null; then
#echo $(type $path"/bin/node")

if command -v $path"/bin/node" > /dev/null 2>&1; then
$path"/bin/node" $path"/server.js" $@
elif type node &> /dev/null; then
elif command -v node > /dev/null 2>&1; then
node $path"/server.js" $@
elif type nodejs &> /dev/null; then
elif command -v nodejs > /dev/null 2>&1; then
nodejs $path"/server.js" $@
else
echo "Did not find "$(dirname "$SCRIPT")"/bin/node, node, or nodejs"
Expand Down
2 changes: 1 addition & 1 deletion metadata/SSCWeb.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"contact": "rweigel@gmu.edu",
"test": "node ./bin/SSCWeb.js --id ace --parameters Time --start 2000-01-01T00:00:00.000Z --stop 2000-01-01T23:59:59.000Z"
},
"catalog": "http://hapi-server.org/servers/SSCWeb/hapi/catalog"
"catalog": "metadata/SSCWeb/SSCWeb-catalog.json"
}

0 comments on commit 3e6e787

Please sign in to comment.