mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	rename files
This commit is contained in:
		
							parent
							
								
									0a73ea0574
								
							
						
					
					
						commit
						a4951d8dc8
					
				| @ -1,15 +1,13 @@ | ||||
| 'use strict'; | ||||
| 
 | ||||
| const util = require('util'); | ||||
| class NameExistsError extends Error { | ||||
|     constructor (message) { | ||||
|         super(); | ||||
|         Error.captureStackTrace(this, this.constructor); | ||||
| 
 | ||||
| function NameExistsError (message) { | ||||
|     Error.call(this); | ||||
|     Error.captureStackTrace(this, this.constructor); | ||||
| 
 | ||||
|     this.name = this.constructor.name; | ||||
|     this.message = message; | ||||
|         this.name = this.constructor.name; | ||||
|         this.message = message; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| util.inherits(NameExistsError, Error); | ||||
| 
 | ||||
| module.exports = NameExistsError; | ||||
|  | ||||
| @ -1,15 +1,13 @@ | ||||
| 'use strict'; | ||||
| 
 | ||||
| const util = require('util'); | ||||
| class NotFoundError extends Error { | ||||
|     constructor (message) { | ||||
|         super(); | ||||
|         Error.captureStackTrace(this, this.constructor); | ||||
| 
 | ||||
| function NotFoundError (message) { | ||||
|     Error.call(this); | ||||
|     Error.captureStackTrace(this, this.constructor); | ||||
| 
 | ||||
|     this.name = this.constructor.name; | ||||
|     this.message = message; | ||||
|         this.name = this.constructor.name; | ||||
|         this.message = message; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| util.inherits(NotFoundError, Error); | ||||
| 
 | ||||
| module.exports = NotFoundError; | ||||
|  | ||||
| @ -1,15 +1,13 @@ | ||||
| 'use strict'; | ||||
| 
 | ||||
| const util = require('util'); | ||||
| class ValidationError extends Error { | ||||
|     constructor (message) { | ||||
|         super(); | ||||
|         Error.captureStackTrace(this, this.constructor); | ||||
| 
 | ||||
| function ValidationError (message) { | ||||
|     Error.call(this); | ||||
|     Error.captureStackTrace(this, this.constructor); | ||||
| 
 | ||||
|     this.name = this.constructor.name; | ||||
|     this.message = message; | ||||
|         this.name = this.constructor.name; | ||||
|         this.message = message; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| util.inherits(ValidationError, Error); | ||||
| 
 | ||||
| module.exports = ValidationError; | ||||
|  | ||||
| @ -1,16 +1,15 @@ | ||||
| 'use strict'; | ||||
| 
 | ||||
| const util = require('util'); | ||||
| const EventEmitter = require('events').EventEmitter; | ||||
| 
 | ||||
| function EventStore (eventDb) { | ||||
|     this.eventDb = eventDb; | ||||
|     EventEmitter.call(this); | ||||
| } | ||||
| util.inherits(EventStore, EventEmitter); | ||||
| module.exports = class EventStore extends EventEmitter { | ||||
|     constructor (eventDb) { | ||||
|         super(); | ||||
|         this.eventDb = eventDb; | ||||
|     } | ||||
| 
 | ||||
| EventStore.prototype.create = function (event) { | ||||
|     return this.eventDb.store(event).then(() => this.emit(event.type, event)); | ||||
|     create  (event) { | ||||
|         return this.eventDb.store(event).then(() => this.emit(event.type, event)); | ||||
|     } | ||||
| }; | ||||
| 
 | ||||
| module.exports = EventStore; | ||||
|  | ||||
| @ -4,7 +4,7 @@ const logger = require('./lib/logger'); | ||||
| const migrator = require('./migrator'); | ||||
| 
 | ||||
| const DEFAULT_OPTIONS = { | ||||
|     databaseUri: process.env.DATABASE_URL, | ||||
|     databaseUri: process.env.DATABASE_URL || 'postgres://unleash_user:passord@localhost:5432/unleash', | ||||
|     port: process.env.HTTP_PORT || process.env.PORT || 4242, | ||||
|     baseUriPath: process.env.BASE_URI_PATH || '', | ||||
| }; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user