Created
March 18, 2019 16:11
-
-
Save Markonis/abf8c105a053be4bc230d5bb54c962f2 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
// Initialize the express server | |
const server = express(); | |
server.use(bodyParser.json()); | |
// Mount the recipes API handlers | |
const mounter = new ExpressApiMounter(server); | |
mounter.mountHandler(api.recipe.create, create); | |
mounter.mountHandler(api.recipe.read, read); | |
mounter.mountHandler(api.recipe.update, update); | |
mounter.mountHandler(api.recipe.destroy, destroy); | |
mounter.mountHandler(api.recipe.list, list); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment