aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xapp.js5
-rwxr-xr-xstart.sh2
2 files changed, 5 insertions, 2 deletions
diff --git a/app.js b/app.js
index a13ce03..c0aec52 100755
--- a/app.js
+++ b/app.js
@@ -2,6 +2,7 @@
2 2
3'use strict'; 3'use strict';
4 4
5
5var express = require('express'), 6var express = require('express'),
6 morgan = require('morgan'), 7 morgan = require('morgan'),
7 passport = require('passport'), 8 passport = require('passport'),
@@ -13,7 +14,7 @@ var express = require('express'),
13 lastMile = require('connect-lastmile'), 14 lastMile = require('connect-lastmile'),
14 multipart = require('./src/multipart'), 15 multipart = require('./src/multipart'),
15 auth = require('./src/auth.js'), 16 auth = require('./src/auth.js'),
16 files = require('./src/files.js')(path.resolve(__dirname, 'files')); 17 files = require('./src/files.js')(path.resolve(__dirname, process.argv[2] || 'files'));
17 18
18var app = express(); 19var app = express();
19var router = new express.Router(); 20var router = new express.Router();
@@ -40,9 +41,11 @@ app.use(passport.session());
40app.use(router); 41app.use(router);
41app.use(lastMile()); 42app.use(lastMile());
42 43
44
43var server = app.listen(3000, function () { 45var server = app.listen(3000, function () {
44 var host = server.address().address; 46 var host = server.address().address;
45 var port = server.address().port; 47 var port = server.address().port;
46 48
47 console.log('Surfer listening at http://%s:%s', host, port); 49 console.log('Surfer listening at http://%s:%s', host, port);
50 console.log('Using base path', path.resolve(__dirname, process.argv[2] || 'files'));
48}); \ No newline at end of file 51}); \ No newline at end of file
diff --git a/start.sh b/start.sh
index 84ea5ef..1805585 100755
--- a/start.sh
+++ b/start.sh
@@ -4,5 +4,5 @@ set -eu
4 4
5export NODE_ENV=production 5export NODE_ENV=production
6 6
7forever start --workingDir /app/code app.js 7forever start --workingDir /app/code app.js /app/data
8forever logs -f 0 \ No newline at end of file 8forever logs -f 0 \ No newline at end of file