function getAllContacts(){
fetch('https://5f217bf8daa42f0016665c89.mockapi.io/api/v1/contacts')
.then(resp => resp.json())
.then(renderToys)
}
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
service: service-name | |
provider: | |
name: aws | |
runtime: nodejs6.10 | |
functions: | |
myfunc: | |
handler: handler.myfunc |
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
handleUser = (e) => { | |
e.preventDefault(); | |
const user = e.target['user-input'].value; | |
fetch(`${config.API_ENDPOINT}/reviews/${user}`) | |
.then((res) => { | |
if (!res.ok) return res.json().then((e) => Promise.reject(e)); | |
return res.json(); | |
}) | |
.then((data) => { | |
if(data.length < 1){ |
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
display
:flex | inline-flex
flex-direction
:row | row-reverse | column | column-reverse
default to
row
.
flex-wrap
:nowrap | wrap | wrap-reverse
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
#!/bin/bash | |
set -ex | |
PARENT_DIR=$(basename "${PWD%/*}") | |
CURRENT_DIR="${PWD##*/}" | |
IMAGE_NAME="$PARENT_DIR/$CURRENT_DIR" | |
TAG="${1}" | |
REGISTRY="hub.docker.com" |
- GET Requests
- POST/PUT Requests
NewerOlder