This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Container, injectable} from 'inversify'; | |
import * as supertest from 'supertest'; | |
import {json, urlencoded} from 'express'; | |
import {InversifyExpressServer} from '../../src/server'; | |
import { | |
controller, httpGet, requestParam, | |
httpDelete, httpPost, httpPut, requestBody, | |
} from '../../src/decorators'; | |
import {cleanUpMetadata} from '../../src/utils'; | |
import {getRouteInfo} from '../../src'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of picking a file and using this | |
// Angular + material, you can go to handleInput | |
<button type="button" mat-raised-button color="primary" (click)="fileInput.click()"> | |
<span>Sube tu foto</span> | |
<input #fileInput type="file" (change)="handleFileInput($event)" style="display:none;" /> | |
</button> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple gist to test parallel promise resolution when using async / await | |
function promiseWait(time) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve(true); | |
}, time); | |
}); | |
} |