Show HN: my first nodejs module, fsjs

https://news.ycombinator.com/item?id=5589926
by siromoney • 13 years ago
3 3 13 years ago

It's on GitHub:

https://github.com/arpith/fsjs

It lets you structure your app a little differently, app.js:

  require('fsjs')(8000,'user','repo',function(data,defaultCallback){
    defaultCallback('<!doctype html>'+data)
  })
And (in the same directory), edit.js:
  exports.get = function(file,callback) {
    console.log(this.request.url)
  // '/arpith/fsjs/edit/README.md'
    callback('the file edited is '+file)
  }
Feedback would be great.

Related Stories

Loading related stories...

Source preview

news.ycombinator.com