Let’s Code: Contact Form in Phoenix - The Public Interface

Let's Code: Contact Form in Phoenix - The Public Interface
Photo by Markus Winkler on Unsplash
In this Let’s Code series, I will be walking through how I added a simple contact form to a Phoenix 1.4 web application. I will try to make this as general purpose as possible so that it’s easier to follow and apply to your own Phoenix applications. I encourage you to follow along, either in an existing Phoenix application or a new one. In Part One of this series, I started with a Message module to serve as the data object for the contact form.
Read more →

Let’s Code: Contact Form in Phoenix – The Schema

In this Let’s Code series, I will be walking through how I added a simple contact form to a Phoenix 1.4 web application. I will try to make this as general purpose as possible so that it’s easier to follow and apply to your Phoenix applications. I encourage you to follow along, either in an existing Phoenix application or a new one. The contact form will take the minimal number of fields from the user (email, subject, and body) and send that information to a support email address.
Read more →

Publishing a Hugo Site to GitHub Pages via GitHub Actions

As of this writing, I am currently using the Hugo static site generator for this site and publishing to GitHub pages. The code is open-source on GitHub. To organize the code, I like to keep the Hugo source files in the master branch and publish from the gh-pages branch. To publish the site, I use a script that I can run locally, but I wanted to check out the relatively new GitHub Actions to see if I could automate the process after a push to the master branch.
Read more →

Writing an API Wrapper in Elixir With HTTPoison

As developers, we often have to interface with third-party APIs. This is no different when writing Elixir apps. Rather than pulling in some third-party library that’s specific to the API, I prefer to use HTTPoison to give me the minimal amount of functionality to write my own wrapper. I prefer to own the API implementation for a few reasons: Only the paths that are used are brought in, alleviating excess code from API implementation that isn’t used.
Read more →