Permalink
Browse files

costum path

  • Loading branch information...
1 parent 5653868 commit 44e473e989c610a899c67a1599b7216b71c0df64 Markus Tiefenbacher committed Dec 19, 2013
Showing with 3 additions and 3 deletions.
  1. +1 −1 README.md
  2. +2 −2 app.js
View
@@ -16,7 +16,7 @@ var store = require('staticstore');
/*
initialize your db. by default in './staticstore'
- you can change this default-path by adding you own as paramater like store.initdb('own-path');
+ you can change this default-path by adding you own as paramater like store.initdb('/root/staticstore');
*/
store.initdb();
View
4 app.js
@@ -10,9 +10,9 @@ var async = require('async');
var dbpath = '/staticstore';
var initialized = false;
- exports.initdb = function(pathname, callback) {
+ exports.initdb = function(costumpath, callback) {
callback = callback || function() {};
- dbpath = (path.dirname(process.mainModule.filename) || __dirname) + (pathname || dbpath);
+ dbpath = costumpath || ((path.dirname(process.mainModule.filename) || __dirname) + dbpath);
fs.exists(dbpath, function (exists) {
if(exists) {
initialized = true;

0 comments on commit 44e473e

Please sign in to comment.