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