{"id":2340,"date":"2021-01-25T07:00:00","date_gmt":"2021-01-25T06:00:00","guid":{"rendered":"https:\/\/denbeke.be\/blog\/?p=2340"},"modified":"2021-01-25T12:11:33","modified_gmt":"2021-01-25T11:11:33","slug":"introducing-la-trappe-melder-get-notified-when-a-new-batch-of-la-trappe-quadrupel-oak-aged-is-released","status":"publish","type":"post","link":"https:\/\/denbeke.be\/blog\/software\/introducing-la-trappe-melder-get-notified-when-a-new-batch-of-la-trappe-quadrupel-oak-aged-is-released\/","title":{"rendered":"Introducing &#8220;La Trappe Melder&#8221;: Get notified when a new batch of La Trappe Quadrupel Oak Aged is released! \ud83c\udf7b"},"content":{"rendered":"\n<p>The last couple of days I spent on writing a web service to notify people of new <a rel=\"noreferrer noopener\" href=\"https:\/\/nl.latrappetrappist.com\/nl\/nl\/producten\/batchregister.html\" target=\"_blank\">La Trappe Quadrupel Oak Aged batches<\/a>. Why did I spent my free time on that? Well&#8230; <a rel=\"noreferrer noopener\" href=\"https:\/\/www.reddit.com\/r\/belgium\/comments\/l1l6kq\/travel_advisory_thursday\/gk1mly0\/?utm_source=reddit&amp;utm_medium=web2x&amp;context=3\" target=\"_blank\">Reddit made me do it<\/a>! And I also really like that beer \ud83d\ude1c\ud83c\udf7b<\/p>\n\n\n\n<h3>Where can I find this important service?<\/h3>\n\n\n\n<p>Go checkout the service at <a rel=\"noreferrer noopener\" href=\"https:\/\/latrappemelder.denbeke.be\" target=\"_blank\">latrappemelder.denbeke.be<\/a>. The source code is on <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/DenBeke\/la-trappe-melder\" target=\"_blank\">Github<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/latrappemelder.denbeke.be\"><img loading=\"lazy\" width=\"1012\" height=\"825\" src=\"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2021\/01\/La-Trappe-Melder-screenshot.png\" alt=\"\" class=\"wp-image-2343\" srcset=\"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2021\/01\/La-Trappe-Melder-screenshot.png 1012w, https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2021\/01\/La-Trappe-Melder-screenshot-300x245.png 300w, https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2021\/01\/La-Trappe-Melder-screenshot-768x626.png 768w\" sizes=\"(max-width: 1012px) 100vw, 1012px\" \/><\/a><figcaption>Screenshot of the frontpage.<\/figcaption><\/figure><\/div>\n\n\n\n<h3>How is the service written?<\/h3>\n\n\n\n<p>The service is written in Go. It contains an ever running job that checks the <a rel=\"noreferrer noopener\" href=\"https:\/\/www.kloosterwinkelonline.nl\/la-trappe-trappist-oak-aged\" target=\"_blank\">online store<\/a> of La Trappe. Once the version number is incremented, the service sends out a mail to all people subscribed. It also contains a webserver to handle the front page and subscriptions.<\/p>\n\n\n\n<ul><li>Batches and subscribers are stored in a Sqlite database using <a rel=\"noreferrer noopener\" href=\"https:\/\/gorm.io\" target=\"_blank\">Gorm<\/a> as ORM.<\/li><li>Scraping is done with <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/PuerkitoBio\/goquery\" target=\"_blank\">GoQuery<\/a>.<\/li><li>Web service is written with with <a rel=\"noreferrer noopener\" href=\"https:\/\/echo.labstack.com\" target=\"_blank\">Echo<\/a>.<\/li><li>Mails are sent through <a rel=\"noreferrer noopener\" href=\"https:\/\/www.mailgun.com\" target=\"_blank\">Mailgun<\/a>. (But the the service itself can be configured to send through any SMTP gateway)<\/li><li>All html templates are compiled within the binary, so they are saved from memory. Alle CSS is included in the HTML, without any external assets (apart from Google fonts). So it should be fast and stable.<\/li><li>All is packed in a Docker image. In production it is served behind <a rel=\"noreferrer noopener\" href=\"https:\/\/traefik.io\/traefik\/\" target=\"_blank\">Traefik<\/a> on a <a rel=\"noreferrer noopener\" href=\"https:\/\/www.scaleway.com\/\" target=\"_blank\">Scaleway<\/a> instance.<\/li><\/ul>\n\n\n\n<p>This written in a very short amount of time, while drinking some La Trappe beers. So don&#8217;t take this as a textbook example of the perfect Go app. \ud83d\ude07 <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" width=\"844\" height=\"548\" src=\"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2021\/01\/La-Trappe-Melder-screenshot-of-the-email-notification-Mac.png\" alt=\"\" class=\"wp-image-2347\" srcset=\"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2021\/01\/La-Trappe-Melder-screenshot-of-the-email-notification-Mac.png 844w, https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2021\/01\/La-Trappe-Melder-screenshot-of-the-email-notification-Mac-300x195.png 300w, https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2021\/01\/La-Trappe-Melder-screenshot-of-the-email-notification-Mac-768x499.png 768w\" sizes=\"(max-width: 844px) 100vw, 844px\" \/><figcaption>Screenshot of the email notification.<\/figcaption><\/figure><\/div>\n\n\n\n<h3>Conclusion<\/h3>\n\n\n\n<p>I probably spent too much time on a service that nobody will use. But at least it will be useful for myself and I had fun coding it!<br>If you find it useful, you can always offer me a beer as reward. \ud83d\ude43<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The last couple of days I spent on writing a web service to notify people of new La Trappe Quadrupel Oak Aged batches. Why did I spent my free time on that? Well&#8230; Reddit made me do it! And I also really like that beer \ud83d\ude1c\ud83c\udf7b Where can I find this important service? Go checkout [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[161],"tags":[286,231,232,151,110],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.6.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Introducing &quot;La Trappe Melder&quot;: Get notified when a new batch of La Trappe Quadrupel Oak Aged is released! \ud83c\udf7b &ndash; DenBeke<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/denbeke.be\/blog\/software\/introducing-la-trappe-melder-get-notified-when-a-new-batch-of-la-trappe-quadrupel-oak-aged-is-released\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introducing &quot;La Trappe Melder&quot;: Get notified when a new batch of La Trappe Quadrupel Oak Aged is released! \ud83c\udf7b &ndash; DenBeke\" \/>\n<meta property=\"og:description\" content=\"The last couple of days I spent on writing a web service to notify people of new La Trappe Quadrupel Oak Aged batches. Why did I spent my free time on that? Well&#8230; Reddit made me do it! And I also really like that beer \ud83d\ude1c\ud83c\udf7b Where can I find this important service? Go checkout [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/denbeke.be\/blog\/software\/introducing-la-trappe-melder-get-notified-when-a-new-batch-of-la-trappe-quadrupel-oak-aged-is-released\/\" \/>\n<meta property=\"og:site_name\" content=\"DenBeke\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-25T06:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-01-25T11:11:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2021\/01\/La-Trappe-Melder-screenshot.png\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:creator\" content=\"@MthsBk\" \/>\n<meta name=\"twitter:site\" content=\"@MthsBk\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/denbeke.be\/blog\/#website\",\"url\":\"https:\/\/denbeke.be\/blog\/\",\"name\":\"DenBeke\",\"description\":\"Mathias Beke\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/denbeke.be\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/denbeke.be\/blog\/software\/introducing-la-trappe-melder-get-notified-when-a-new-batch-of-la-trappe-quadrupel-oak-aged-is-released\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/denbeke.be\/blog\/wp-content\/uploads\/2021\/01\/La-Trappe-Melder-screenshot.png\",\"width\":1012,\"height\":825},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/denbeke.be\/blog\/software\/introducing-la-trappe-melder-get-notified-when-a-new-batch-of-la-trappe-quadrupel-oak-aged-is-released\/#webpage\",\"url\":\"https:\/\/denbeke.be\/blog\/software\/introducing-la-trappe-melder-get-notified-when-a-new-batch-of-la-trappe-quadrupel-oak-aged-is-released\/\",\"name\":\"Introducing \\\"La Trappe Melder\\\": Get notified when a new batch of La Trappe Quadrupel Oak Aged is released! \\ud83c\\udf7b &ndash; DenBeke\",\"isPartOf\":{\"@id\":\"https:\/\/denbeke.be\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/denbeke.be\/blog\/software\/introducing-la-trappe-melder-get-notified-when-a-new-batch-of-la-trappe-quadrupel-oak-aged-is-released\/#primaryimage\"},\"datePublished\":\"2021-01-25T06:00:00+00:00\",\"dateModified\":\"2021-01-25T11:11:33+00:00\",\"author\":{\"@id\":\"https:\/\/denbeke.be\/blog\/#\/schema\/person\/386878f712fe3fe22227216f087772dc\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/denbeke.be\/blog\/software\/introducing-la-trappe-melder-get-notified-when-a-new-batch-of-la-trappe-quadrupel-oak-aged-is-released\/\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/denbeke.be\/blog\/#\/schema\/person\/386878f712fe3fe22227216f087772dc\",\"name\":\"Mathias Beke\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/denbeke.be\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/015ba35e6ce4f5859e3888ca99807575?s=96&d=mm&r=g\",\"caption\":\"Mathias Beke\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/posts\/2340"}],"collection":[{"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/comments?post=2340"}],"version-history":[{"count":5,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/posts\/2340\/revisions"}],"predecessor-version":[{"id":2348,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/posts\/2340\/revisions\/2348"}],"wp:attachment":[{"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/media?parent=2340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/categories?post=2340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/denbeke.be\/blog\/wp-json\/wp\/v2\/tags?post=2340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}