Skip to content

Commit

Permalink
other niceties added
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ ONeal committed May 19, 2012
1 parent f385e63 commit 78d0372
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ files
*.swp
*.swo
config.js
db.json
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
files
db.json
node_modules
.git
1 change: 1 addition & 0 deletions bin/dropshare-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
;

console.log("Dropshare listening on http://%s:%d", addr.address, addr.port);
console.log("Saving files to " + app.filesDir);
}

/*
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
, "numeric-buffer": "0.1.x"
, "dom-storage": "1.x"
, "json-storage": "1.x"
, "mkdirp": "0.3.x"
},
"devDependencies": {}
}
3 changes: 3 additions & 0 deletions server/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

var connect = require('connect')
, fs = require('fs.extra')
, mkdirp = require('mkdirp')
, assert = require('assert')
, Futures = require('futures')
, Formaline = require('formaline')
Expand Down Expand Up @@ -352,6 +353,7 @@

// Make sure filesDir exists and is writable
try {
mkdirp.sync(filesDir);
filesDirStats = fs.statSync(filesDir);
if (!filesDirStats.isDirectory()) {
throw new Error('Storage path is not a directory!');
Expand Down Expand Up @@ -387,6 +389,7 @@
// Production
//, connect.errorHandler()

app.filesDir = filesDir;
return app;
}

Expand Down

0 comments on commit 78d0372

Please sign in to comment.