{"id":586,"date":"2017-04-03T12:15:33","date_gmt":"2017-04-03T12:15:33","guid":{"rendered":"http:\/\/2017.asheville.wordcamp.org\/?post_type=wcb_session&#038;p=586"},"modified":"2017-06-24T14:59:33","modified_gmt":"2017-06-24T14:59:33","slug":"wordpress-and-express-building-better-apis","status":"publish","type":"wcb_session","link":"https:\/\/asheville.wordcamp.org\/2017\/session\/wordpress-and-express-building-better-apis\/","title":{"rendered":"WordPress and Express: Building Better APIs"},"content":{"rendered":"<p>For BeerNC, Cardinal Media used WordPress for content management but served content and user data over a custom Express App. This provided a content management experience the client was comfortable with and the security and control of Express for the app\u2019s internal-facing API.<\/p>\n<p>Takeaways:<\/p>\n<ul>\n<li>Using Express and an ORM can be better for some use-cases than the baked-in WP-API features.<\/li>\n<li>Using WP-API methods and hooks can be used to create webhooks to keep an external API in sync with WordPress content, while giving content creators the ease-of-use that WordPress offers.<\/li>\n<li>Shortcodes can be integrated into a front-end framework \u2013 we used Ionic2 to build BeerNC, but the methodology should be similar for most front-end frameworks.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>For BeerNC, Cardinal Media used WordPress for content management but served content and user data over a custom Express App. This provided a content management experience the client was comfortable with and the security and control of Express for the app\u2019s internal-facing API. Takeaways: Using Express and an ORM can be better for some use-cases &hellip; <a href=\"https:\/\/asheville.wordcamp.org\/2017\/session\/wordpress-and-express-building-better-apis\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">WordPress and Express: Building Better APIs<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":8712975,"featured_media":0,"template":"","meta":{"jetpack_post_was_ever_published":false,"_wcpt_session_time":1496496600,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"https:\/\/docs.google.com\/presentation\/d\/1AJgu0nc-Bb_tbXoXAlAxPL8Gmt7YHTGJyMxPNH4evzE\/pub?start=false&loop=false&delayms=5000&slide=id.p","_wcpt_session_video":"http:\/\/wordpress.tv\/2017\/06\/16\/ethan-butler-and-jordan-cauley-wordpress-and-express-building-better-apis\/","_wcpt_speaker_id":[455,427],"footnotes":""},"session_track":[4045],"session_category":[],"class_list":["post-586","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-developerdesigner"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p81sqx-9s","session_date_time":{"date":"June 3, 2017","time":"1:30 pm"},"session_speakers":[{"id":"455","slug":"jordan-cauley","name":"Jordan Cauley","link":"https:\/\/asheville.wordcamp.org\/2017\/speaker\/jordan-cauley\/"},{"id":"427","slug":"ethan-butler","name":"Ethan Butler","link":"https:\/\/asheville.wordcamp.org\/2017\/speaker\/ethan-butler\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/asheville.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/asheville.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/asheville.wordcamp.org\/2017\/wp-json\/wp\/v2\/types\/wcb_session"}],"author":[{"embeddable":true,"href":"https:\/\/asheville.wordcamp.org\/2017\/wp-json\/wp\/v2\/users\/8712975"}],"version-history":[{"count":2,"href":"https:\/\/asheville.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/586\/revisions"}],"predecessor-version":[{"id":1654,"href":"https:\/\/asheville.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/586\/revisions\/1654"}],"speakers":[{"embeddable":true,"href":"https:\/\/asheville.wordcamp.org\/2017\/wp-json\/wp\/v2\/speakers\/455"},{"embeddable":true,"href":"https:\/\/asheville.wordcamp.org\/2017\/wp-json\/wp\/v2\/speakers\/427"}],"wp:attachment":[{"href":"https:\/\/asheville.wordcamp.org\/2017\/wp-json\/wp\/v2\/media?parent=586"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/asheville.wordcamp.org\/2017\/wp-json\/wp\/v2\/session_track?post=586"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/asheville.wordcamp.org\/2017\/wp-json\/wp\/v2\/session_category?post=586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}