https://www.youtube.com/watch?v=g90irqWEqd8 (Async JavaScript with Promises)
- with my webstorm IDE (I believe) i just need to run as debug which will automatically refresh the browser
part of the ECMA6 proposal, but has been around a while via third-parties available in all major browsers except IE (11 even)
let promise = {
then: function() {},
catch: function() {}
}
-
the
then
function is called anytime the promise is successful. -
adapted to use
express
instead ofbudo
-
running gives this error
(node:12484) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: xhr.open is not a function
-
also, having problem running in-browser. right now it just says
Cannot GET /
which i know how to deal with since it's inexpress
. before withbudo
i didn't know how to deal with that error message, which was as I term "chrome-level":This site can’t be reached. localhost refused to connect.