Skip to content

Instantly share code, notes, and snippets.

Created August 2, 2010 20:55
What would you like to do?
public function start():Void {
//register csv file input listener
stdIn = Node.process.openStdin();
stdIn.addListener(Node.EVENT_STREAM_DATA, onCSVInput);
private function readCSVFile(fileName:String):Void {
var me:StartupHandler = this;
Node.require("fs").readFile(fileName, Node.UTF8, function(err:Dynamic, content:String) {
//stop listening for csv input
me.stdIn.removeListener(Node.EVENT_STREAM_DATA, me.onCSVInput);
...more code...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment