#! /bin/bash
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd );
FILE="$DIR/config/$1".env && shift
START="$DIR/$1" && shift
USAGE="Usage: ./start.sh <config> <startscript> [startscript_opts]..."

if [ ! -r $FILE ] ; then
  echo "config file not found"
  echo $USAGE
  exit 1
fi

if [ ! -r $START ] ; then
  echo "start script not found"
  echo $USAGE
  exit 1
fi

source $FILE

exec node $START $@

#! /bin/bash

DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd );
FILE="$DIR/config/$2".env
START=$DIR"/"$1
USAGE="Usage: ./start.sh <startscript> <config>"

if [ ! -r $FILE ] ; then
  echo "config file not found"
  echo $USAGE
  exit 1
fi

if [ ! -r $START ] ; then
  echo "start script not found"
  echo $USAGE
  exit 1
fi

source $FILE

exec node $START

--- 
+++ 
@@ -1,8 +1,9 @@
 #! /bin/bash
+
 DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd );
-FILE="$DIR/config/$1".env && shift
-START="$DIR/$1" && shift
-USAGE="Usage: ./start.sh <config> <startscript> [startscript_opts]..."
+FILE="$DIR/config/$2".env
+START=$DIR"/"$1
+USAGE="Usage: ./start.sh <startscript> <config>"
 
 if [ ! -r $FILE ] ; then
   echo "config file not found"
@@ -18,4 +19,4 @@
 
 source $FILE
 
-exec node $START $@
+exec node $START
Move environment as first parameter to allow passing arguments

Small fix on bash variable assignment
Fix start.sh USAGE
