You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
316 B
16 lines
316 B
#!/bin/bash
|
|
CONF=$1
|
|
if [ -z "$CONF" ];
|
|
then
|
|
echo missing configuration argument, aborting
|
|
exit 1
|
|
fi
|
|
DIR="$(dirname "$(readlink -f "$0")")"
|
|
# echo $DIR
|
|
cd $DIR || exit
|
|
NODE=$(which node)
|
|
export NODE_ENV=production
|
|
export NODE_APP_INSTANCE=$CONF
|
|
export NODE_ENV=$2
|
|
# echo $NODE
|
|
$NODE -r esm $DIR/index.js
|
|
|