This file contains hidden or 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
const pause = (data, time) => new Promise(resolve => setTimeout(() => resolve(data), time)); | |
const pauseReject = (data, time) => | |
new Promise((resolve, reject) => | |
setTimeout(() => reject(new Error(`Something went wrong in the ${data} promise`)), time) | |
); | |
const parallelErrorHandlingWrong = () => { | |
const firstPromise = pause('first', 3000); | |
const secondPromise = pauseReject('second', 2000); | |
const thirdPromise = pause('third', 1000); |
This file contains hidden or 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
# This configuration can be used to create a reverse proxy for use with Figment's DataHub service | |
# | |
# This file can be included by placing it into /etc/nginx/sites-enabled/ (Debian based distros) | |
# or /etc/nginx/conf.d/ (Red Hat based distros) | |
server { | |
# The proxy will listen on port 80 (SSL is not enabled) | |
listen 80; | |
# Replace EXAMPLE with the DataHub service name |