This file contains hidden or 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
const request = new XMLHttpRequest(); | |
request.open ('GET', 'https://datausa.io/api/data?drilldowns=Nation&measures=Population') | |
request.send(); | |
console.log(request.responseText) | |
request.addEventListener('load', function(){ | |
data = JSON.parse(this.responseText) | |
console.log(data) | |
}) |
This file contains hidden or 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
. | |
└── src/ | |
├── routers.ts | |
├── libs/ | |
│ ├── bases/ | |
│ │ ├── BaseErrorHandler.ts | |
│ │ ├── BaseRepositoryMongoDb.ts (implements IRepository<T>) | |
│ │ ├── BaseRepositoryMssql.ts (implements IRepository<T>) | |
│ │ └── Result.ts | |
│ ├── interfaces/ |
This file contains hidden or 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
type Person = { | |
name: string; | |
surname: string | |
} | |
type Lifespan = { | |
birth: Date; | |
death: Date | |
} |