Add a first cut at an express-based backend
This commit is contained in:
32
express/run.sh
Executable file
32
express/run.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# XXX should we default to strict or non-strict here?
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
run_dir="$DIR"
|
||||
|
||||
source "$run_dir"/../framework/shims/common
|
||||
source "$run_dir"/../framework/shims/node.common
|
||||
|
||||
strict_arg="${1:---no-strict}"
|
||||
|
||||
if [[ "$strict_arg" = "--strict" ]] ; then
|
||||
strict="yes"
|
||||
else
|
||||
strict="no"
|
||||
fi
|
||||
|
||||
cmd="tsx"
|
||||
if [[ "strict" = "yes" ]] ; then
|
||||
cmd="ts-node"
|
||||
fi
|
||||
|
||||
cd "$run_dir"
|
||||
|
||||
"$run_dir"/check.sh
|
||||
#echo checked
|
||||
# $ROOT/cmd "$cmd" $run_dir/app.ts
|
||||
../cmd node "$run_dir"/out/app.js
|
||||
Reference in New Issue
Block a user