Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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