Permalink
Browse files

fixed issue #3 with the database

  • Loading branch information...
1 parent cbfa00d commit fbeba07ae6573ae594e02f51d907c983cd5a9e81 @matthewfl matthewfl committed Dec 4, 2010
Showing with 3 additions and 2 deletions.
  1. +1 −1 production.js
  2. +2 −1 sandbox/modules.js
View
@@ -21,7 +21,7 @@ var server = http.createServer(function (req, res) {
return;
}
code = JSON.parse(code);
- boxes[req.headers.host] = new sandbox.SandBox(code.code, {test: false, user: code.user, app: code.app});
+ boxes[req.headers.host] = new sandbox.SandBox(code.code, {test: false, user: code.user, name: code.name});
boxes[req.headers.host]._loaded = Date.now();
boxes[req.headers.host]._last_use = Date.now();
boxes[req.headers.host].server(req, res);
View
@@ -59,6 +59,7 @@ exports.db = exports.database = function (context, config) {
var baseName = "db_"+config.user+"_"+config.name+"_";
var tmp={};
console.log(config);
+ console.log(baseName)
return {
get: function (name, back) {
if(config.test && tmp[name]) back(tmp[name]);
@@ -70,7 +71,7 @@ exports.db = exports.database = function (context, config) {
tmp[name]= value+"";
process.nextTick(back);
}else
- db.set(baseName+name, value, back);
+ db.set(baseName+name, value+"", back);
},
remove: function (name, back) {
if(config.test) {

0 comments on commit fbeba07

Please sign in to comment.