Moving readdir OUTSIDE of createServer function :)