Skip to content

Commit

Permalink
fixed issue matthewfl#3 with the database
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfl committed Dec 4, 2010
1 parent cbfa00d commit fbeba07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion production.js
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion sandbox/modules.js
Expand Up @@ -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]);
Expand All @@ -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) {
Expand Down

0 comments on commit fbeba07

Please sign in to comment.