-
-
Save jimdel/d433d921c7c4e57c73cd31a74bffb694 to your computer and use it in GitHub Desktop.
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
app.get('/cake', (req, res, next) => { | |
let chocolateCakeCount = 0 | |
if(chocolateCakeCount >= 1) { | |
res.send(`Here is some chocolate cake!`) | |
} else { | |
var error = new Error('Sorry, there is no chocolate cake!'); | |
next(error); | |
return | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment