Skip to content

Instantly share code, notes, and snippets.

Avatar
😄

Aguilera WebDeveloper fedeaguilera

😄
View GitHub Profile
@analogic
analogic / docker-compose.yml
Last active January 11, 2023 11:46
Poste.io (with Lets Encrypt) + Nginx reverse proxy + Nginx Lets encrypt companion
View docker-compose.yml
version: '3'
services:
nginx-proxy:
image: jwilder/nginx-proxy
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
container_name: nginx-proxy
restart: unless-stopped
ports:
@fgilio
fgilio / axios-catch-error.js
Last active March 14, 2023 13:11
Catch request errors with Axios
View axios-catch-error.js
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨