debugging
This commit is contained in:
parent
9e83bbf956
commit
8429b0ac2f
1808
.idea/workspace.xml
1808
.idea/workspace.xml
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@ -7,6 +7,15 @@
|
||||
"rss-braider": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.13.4"
|
||||
"express": "^4.13.4",
|
||||
"body-parser": "^1.14.2",
|
||||
"cookie-parser": "*",
|
||||
"ejs": "*",
|
||||
"errorhandler": "*",
|
||||
"morgan": "*",
|
||||
"express-session": "*",
|
||||
"htmlparser": "^1.7.7",
|
||||
"method-override": "*",
|
||||
"request": "*"
|
||||
}
|
||||
}
|
||||
|
@ -1,31 +1,38 @@
|
||||
var express = require('express'), path = require('path'), http = require('http') ;
|
||||
var express = require('express'), path = require('path'), http = require('http'), ejs = require('ejs'), morgan = require('morgan'), cookieparser = require('cookie-parser'), session = require('express-session');
|
||||
var methodoverride = require('method-override'), bodyparser = require('body-parser'), errorhandler = require('errorhandler');
|
||||
var app = express();
|
||||
var lastcheck = 0;
|
||||
var btcCache = {}, fxCache = {};
|
||||
|
||||
app.configure(function () {
|
||||
//app.configure(function () {
|
||||
app.set('port', 9002);
|
||||
app.use(express.logger('dev'));
|
||||
app.use(express.cookieParser());
|
||||
app.use(express.session({secret: '1234567890QWERTY'}));
|
||||
/* 'default', 'short', 'tiny', 'dev' */
|
||||
app.use(express.methodOverride());
|
||||
app.use(morgan('combined'));
|
||||
app.use(cookieparser('your secret here'));
|
||||
app.use(session({
|
||||
secret: '1234567890QWERTY', resave: false,
|
||||
saveUninitialized: false
|
||||
}));
|
||||
/* 'default', 'short', 'tiny', 'dev' */
|
||||
app.use(methodoverride());
|
||||
|
||||
app.use(express.bodyParser());
|
||||
app.use(bodyparser.urlencoded({extended: false}));
|
||||
|
||||
app.use(function (req, res, next) {
|
||||
res.header("Access-Control-Allow-Origin", "*");
|
||||
res.header("Access-Control-Allow-Headers", "X-Requested-With");
|
||||
next();
|
||||
});
|
||||
app.use(app.router);
|
||||
// parse application/json
|
||||
app.use(bodyparser.json());
|
||||
|
||||
app.use(function (req, res, next) {
|
||||
res.header("Access-Control-Allow-Origin", "*");
|
||||
res.header("Access-Control-Allow-Headers", "X-Requested-With");
|
||||
next();
|
||||
});
|
||||
//app.use(app.router);
|
||||
app.use(express.static(path.join(__dirname, 'html')));
|
||||
|
||||
app.use(express.errorHandler({dumpExceptions: true, showStack: true}));
|
||||
|
||||
app.use(errorhandler({dumpExceptions: true, showStack: true}));
|
||||
|
||||
|
||||
|
||||
});
|
||||
//});
|
||||
|
||||
/**
|
||||
* create the server
|
||||
|
Loading…
Reference in New Issue
Block a user