News for hackers. Stuff that matters.
Re:Avoiding Nested Callbacks in JavaScript by jashkenas on Thursday June 30, 2011 @02:08PM (#2715089)
Translating the original example, sans error throws:

    fs = require 'fs'

    fs.mkdir './hello', 0777, ->
      fs.writeFile './hello/world.txt', 'Hello!', ->
        console.log 'File created with contents: '
        fs.readFile './hello/world.txt', 'UTF-8', (err, data) ->
          console.log data

There are no comments on this comment yet.