* Binds the dino instance to express app * @Throws Error(Errors.routerNotRegistered) * @Throws Error(Errors.dinoAlreadyBinded) * @Throws Error(Errors.baseUriInvalid)
()
| 118 | * @Throws Error(Errors.baseUriInvalid) |
| 119 | */ |
| 120 | bind(): void { |
| 121 | if (this.isBinded) { |
| 122 | throw new Error(Errors.dinoAlreadyBinded); |
| 123 | } |
| 124 | if (DataUtility.isUndefinedOrNull(this.appContainer.baseUri)) { |
| 125 | throw new Error(Errors.baseUriInvalid); |
| 126 | } |
| 127 | if (DataUtility.isUndefinedOrNull(this.appContainer.useRouter)) { |
| 128 | throw new Error(Errors.routerNotRegistered); |
| 129 | } |
| 130 | |
| 131 | this.isBinded = true; |
| 132 | this.appContainer.build(); |
| 133 | } |
| 134 | } |