Factor out the script into bin/, make app executable into node.js script