I’ve been in the web game for quite some time and have my fair share of web server software. I’ve used Microsoft’s Internet Information Services (IIS), Apache httpd, as well as NGINX, and while they all thrive in their own ways, they’ve been overkill for most of my use cases. This is where Caddy comes in, a lightweight alternative to these seasoned, but often heavy web servers.
We’re going to see how to use Caddy and learn why it is so powerful while using minimal effort on a developer operations side.
Read MoreIf you’ve been keeping up, you’ll remember I released a very popular tutorial titled, Getting Started with GraphQL Using Golang which was more or less a quick-start to using GraphQL in your web applications. Since then, I demonstrated an alternative way to work with related data in a tutorial titled, Maintain Data Relationships Through Resolvers with GraphQL in a Golang Application. Both articles are great, but they left out an important feature that most modern APIs must have. Most modern APIs must have a way to authorize particular users to access only certain pieces of data and not all data offered by the service.
One of the most popular ways to enforce some kind of authorization in an application is through the use of JSON web tokens (JWT). Users authenticate with a service and the service responds with a JWT to be used in every future request so that way the password is kept safe. The service can then validate the JWT to make sure it is correct and not expired.
We’re going to see how to protect particular GraphQL properties as well as entire queries using JSON web tokens and the Go programming language.
Read MoreI recently wrote about getting started with GraphQL in a Golang application, where I discussed the creation of schemas, executing queries, and mutating data, even though it was all mock data. In this example there were queries for related data, but they were constructed in a very independent form.
We’re going to see how to query for related data, similar to what you’d find in a JOIN
operation on a relational database, but using GraphQL and the Go programming language.
I’ve been hearing increasing amounts of buzz around GraphQL, a technology that has been around for quite a few years now. In case you’re not familiar, it is a technology for querying API data from a client-front end without having to make numerous requests or receiving unimportant data, both of which may cause negative affects on network latency.
Think of trying to query a relational database. Ideally you write a SQL query for the data you want and you do it in a single request. GraphQL tries to accomplish the same, but from an API consumption level.
We’re going to see how to implement a web application using the Go programming language, but uses GraphQL when working with the data.
Read MoreAs you may or may not know, The Polyglot Developer is currently using Hugo, which is a static site generator. When getting started with Hugo, the themes and documentation don’t say much when it comes to having more than one possible author producing content.
For example, as mentioned in my previous article, this site is always accepting guest contributions for technical content. There have been several tutorials contributed, but when it comes to credit, I want these tutorials to show under the authors name, not my name just because I’m the owner of the blog.
We’re going to see how to work with data templates in Hugo to create and use different authors for different articles.
Read MoreOver the past month or so, in my free time, I’ve been working towards creating an affordable hardware wallet for various cryptocurrencies such as Bitcoin. Right now many cryptocurrency enthusiasts are using the Ledger Nano S hardware wallet, but those are very expensive and rarely in supply.
I own several Raspberry Pi Zero and thought it would be a perfect opportunity to take what I know about Raspberry Pi and Golang to create a wallet for a fraction of the price as the industry leading wallets.
We’re going to see how to create a hardware wallet, which I’m calling the Open Ledger Micro, using Golang and a Raspberry Pi Zero.
Read MoreAbout a month ago I had written about creating and importing private keys as well as generating public addresses for Bitcoin and several other cryptocurrencies using the Go programming language. This previous tutorial had more of an emphasis on creating cryptocurrency wallets with Golang than anything.
The next step in making Bitcoin and other cryptocurrencies useful is to be able to transfer or send them to other people. Sending Bitcoin is part of a process known as creating and broadcasting a transaction.
While we won’t be actually broadcasting a transaction in this tutorial, we’re going to figure out how to create an unsigned transaction, then sign it, using the Go programming language and some popular Bitcoin packages.
Read More