Api

matthewfl edited this page Dec 18, 2010 · 2 revisions
Clone this wiki locally

JSAPP.US modules

##db

get(name, callback)
set(name, value, opt_callback)
remove(name, opt_callback)
has(name, callback)
var db = require('db');
db.set("test", "some value");
db.get("test", function (what) {
  res.write(what);
});

Low Level Jsapp api

Node.JS modules

The docs for the base modules can be found at http://nodejs.org/api.html Some modules are not allowed at in the sandbox

allowed modules

  • url
  • path
  • buffer
  • crypto

restricted modules

  • http
    • All out going request need to be to port 80
  • fs
    • There is only the readFile function thus far, I have no plans for any writing of the file system as it uses the same backing as the database

removed modules

  • net
  • child_process
  • dgram
  • dns