Commit fb372a32 by Johannes Zellner

Use proper data directory

1 parent cfe24a27
Showing with 7 additions and 2 deletions
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
'use strict'; 'use strict';
var express = require('express'), var express = require('express'),
morgan = require('morgan'), morgan = require('morgan'),
passport = require('passport'), passport = require('passport'),
...@@ -13,7 +14,7 @@ var express = require('express'), ...@@ -13,7 +14,7 @@ var express = require('express'),
lastMile = require('connect-lastmile'), lastMile = require('connect-lastmile'),
multipart = require('./src/multipart'), multipart = require('./src/multipart'),
auth = require('./src/auth.js'), auth = require('./src/auth.js'),
files = require('./src/files.js')(path.resolve(__dirname, 'files')); files = require('./src/files.js')(path.resolve(__dirname, process.argv[2] || 'files'));
var app = express(); var app = express();
var router = new express.Router(); var router = new express.Router();
...@@ -40,9 +41,11 @@ app.use(passport.session()); ...@@ -40,9 +41,11 @@ app.use(passport.session());
app.use(router); app.use(router);
app.use(lastMile()); app.use(lastMile());
var server = app.listen(3000, function () { var server = app.listen(3000, function () {
var host = server.address().address; var host = server.address().address;
var port = server.address().port; var port = server.address().port;
console.log('Surfer listening at http://%s:%s', host, port); console.log('Surfer listening at http://%s:%s', host, port);
console.log('Using base path', path.resolve(__dirname, process.argv[2] || 'files'));
}); });
\ No newline at end of file
...@@ -4,5 +4,5 @@ set -eu ...@@ -4,5 +4,5 @@ set -eu
export NODE_ENV=production export NODE_ENV=production
forever start --workingDir /app/code app.js forever start --workingDir /app/code app.js /app/data
forever logs -f 0 forever logs -f 0
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!