Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

costum path

  • Loading branch information...
commit 44e473e989c610a899c67a1599b7216b71c0df64 1 parent 5653868
Markus Tiefenbacher authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  README.md
  2. +2 −2 app.js
2  README.md
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();
4 app.js
View
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.