Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/renatobritodev/consuming-api
Mini project to consuming api.
https://github.com/renatobritodev/consuming-api
api axios cors express javascript nodejs nodemon
Last synced: about 1 month ago
JSON representation
Mini project to consuming api.
- Host: GitHub
- URL: https://github.com/renatobritodev/consuming-api
- Owner: renatobritodev
- Created: 2022-05-22T05:52:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-13T20:22:05.000Z (almost 2 years ago)
- Last Synced: 2024-04-22T04:45:51.680Z (8 months ago)
- Topics: api, axios, cors, express, javascript, nodejs, nodemon
- Language: HTML
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Consumir API
## API
Criar um API
- [x] Iniciar o projeto `npm init -y`
- [x] Instalar as dependências `npm i express nodemon cors axios`
- [x] Cria uma rota para acessar a API
- [x] Servir a API
- [x] Habilitar o CORS (Cross-Origin Resource Sharing)
- [x] Habilitar o nodemon para reiniciar o server## Frontend
Consumir APi
- [x] Utilizar fetch para consumir nossa API backend
- [x] Explicar Promise async/await
- [x] Usar try/catch
- [x] Mostrar a resposta na tela## Backend
Consumir API
- [x] jsonplaceholder `https://jsonplaceholder.typicode.com/`
- [x] Usar axios
- [x] Semelhanças entre axios e fetch
- [x] Usar try/catch