Skip to content

Instantly share code, notes, and snippets.

@mountain
Created June 12, 2012 00:51
Show Gist options
  • Save mountain/2913723 to your computer and use it in GitHub Desktop.
Save mountain/2913723 to your computer and use it in GitHub Desktop.
Shell wrapper for node.js antinode static server
#!/bin/bash
#
# A wrapper for runner
#
CUR="${BASH_SOURCE[0]}";
if([ -h "${CUR}" ]) then
while([ -h "${CUR}" ]) do CUR=`readlink -m "${CUR}"`; done
fi
pushd . > /dev/null
cd `dirname ${CUR}` > /dev/null
CUR=`pwd`;
popd > /dev/null
exec "node" "${CUR}/server.js" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment