Compare commits
5 Commits
master
...
production
Author | SHA1 | Date |
---|---|---|
John Crepezzi | 32df3370e2 | |
John Crepezzi | d81195856a | |
John Crepezzi | 6ed427658e | |
John Crepezzi | 08eddc7e80 | |
John Crepezzi | d040dedc6e |
|
@ -33,10 +33,7 @@
|
|||
},
|
||||
|
||||
"storage": {
|
||||
"type": "redis",
|
||||
"host": "0.0.0.0",
|
||||
"port": 6379,
|
||||
"db": 2,
|
||||
"type": "postgres",
|
||||
"expire": 2592000
|
||||
},
|
||||
|
||||
|
|
|
@ -69,7 +69,8 @@ DocumentHandler.prototype.handlePost = function (request, response) {
|
|||
_this.chooseKey(function (key) {
|
||||
_this.store.set(key, buffer, function (res) {
|
||||
if (res) {
|
||||
winston.verbose('added document', { key: key });
|
||||
var ip = request.headers['x-forwarded-for'] || request.ip;
|
||||
winston.verbose('added document', { key: key, ip: ip });
|
||||
response.writeHead(200, { 'content-type': 'application/json' });
|
||||
response.end(JSON.stringify({ key: key }));
|
||||
}
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
"connect": "3.4.1",
|
||||
"st": "1.1.0",
|
||||
"winston": "0.6.2",
|
||||
"redis-url": "0.1.0",
|
||||
"redis": "0.8.1",
|
||||
"uglify-js": "1.3.3",
|
||||
"busboy": "0.2.4",
|
||||
"pg": "4.1.1"
|
||||
|
@ -31,8 +29,7 @@
|
|||
},
|
||||
"bundledDependencies": [],
|
||||
"engines": {
|
||||
"node": "0.10.35",
|
||||
"npm": "1.1.49"
|
||||
"node": "0.10.35"
|
||||
},
|
||||
"bin": {
|
||||
"haste-server": "./server.js"
|
||||
|
|
Loading…
Reference in New Issue