Permalink
Browse files

update

  • Loading branch information...
1 parent 90f4c29 commit 35c1a940e098cc19911c718f3a63a9aacbcd1ba0 @daimor daimor committed Dec 4, 2011
Showing with 14 additions and 4 deletions.
  1. +12 −1 2/daimor/README.txt
  2. +2 −3 2/daimor/routes/index.js
View
13 2/daimor/README.txt
@@ -1,6 +1,13 @@
Log viewer
+installing dependicies global
+sudo npm install -g
+or local to ./node_modules
+npm install
+
+change root of globalsdb var in logs.js
+
use console
Usage: node ./app.js [commands] [arguments]
@@ -17,4 +24,8 @@ or start webserver on 3000 port
node ./app start
system files log can add only console mode
-system files on start webserver, start autorefresh
+system files on start webserver, start autorefresh
+
+running on amazon
+http://ec2-174-129-150-114.compute-1.amazonaws.com/
+
View
5 2/daimor/routes/index.js
@@ -22,8 +22,7 @@ exports.importForm = function(req, res){
};
exports.importFile = function(req, res){
-
- var file = req.body.upload
+ var file = req.body.upload || req.files.upload || null;
if(file){
var filePath = file.path
var filename = file.filename
@@ -46,7 +45,7 @@ exports.logs = function(req, res){
max = parseInt(max);
var logData = log.fetch('',max);
max += 50;
- if( max >= log.count) max = 0;
+ if( max > log.count) max = 0;
res.render('logfile', { title: 'View log file', log: log, logData: logData, max: max, canRefresh: log.canRefresh })
} else {
var logs = listLogs.fetch();

0 comments on commit 35c1a94

Please sign in to comment.