0.0.1 • Published 10 years ago

diamond-middleware v0.0.1

Weekly downloads
5
License
-
Repository
github
Last release
10 years ago

Diamond

Diamond is a very easy to use middleware & browser plugin combination for file system exploration.

1. Use middleware app.js

app.use('/diamond', require('./lib/diamond')({
  directory: __dirname
}))

2. Include plugin layout.jade

  script(src="/vendors/jquery-2.1.1/jquery-2.1.1.min.js")
  script(src="/diamond/diamond.js")

3. Initialize client-script.js

  demo = new Diamond("#demo")
  demo.onOpenFile = function (path, data) {
    console.log("opened file: ", path)
    console.log("file contents: ", data)
  }