Make a network request to fetch some JSON and print the result
Data is fetching from JSONPlaceholder
- npm
- typescript
- ts-node
$ sudo npm install -g typescript ts-node
Clone repo, cd into folder then:
- Run the code
$ ts-node index.ts
- Convert to plain JavaScript
$ tsc index.ts
- Axios: Promise based HTTP request