Posts Tagged: golang

Running Caddy as a service on macOS X server

Installing Caddy Download Caddy from the official website. Give the executable root permissions1: $ chown root ./caddy $ chmod +s ./caddy Caddyfile Caddy reads it configuration for the Caddyfile. More information can be found in the official documentation. Launchd config Create a launchd plist file: ~/Library/LaunchAgents/com.caddyserver.web.plist. This file should look like this: <?xml version=”1.0″ encoding=”UTF-8″?>… Read more »

Running Gogs (Go Git Service) as a service on macOS X server

This guides explains how you can run Gogs git server as a service on your Mac using launchd. Command line tools First you need to install Xcode from the Mac App Store. Once installed, you also need the Command Line Tools, you can initiate the download process by executing $ xcode-select –install in the Terminal…. Read more »

Two months ago I started to “Serve The Web Like It’s 2016”, and I’m still loving Caddy!

Caddy? Wooha, hold your horses, what is Caddy?! Caddy is a web server like Apache or Nginx, but different: Caddy is a modern web server (supporting HTTP/2) with elegant and easy configuration. It comes with automated HTTPS (with Let’s Encrypt) and a growing number of extensions (including Git support). It’s open source software, written in… Read more »

Getting a Mac ready for development

Apple computers are awesome: they are fancy machines which make your daily life easier. But every developer knows that there are a lot of things to install and configure before you can actually start programming. This guide is an overview of how I configure my Mac for development. I’m sure everyone has his own habits… Read more »

Caddy Server and WordPress (PHP-FPM)

Update: I added rewrite rules for WordPress permalinks to the Caddyfile. I also removed all unnecessary bits which are not needed anymore since Caddy now has built-in HTTPS support with Let’s Encrypt. Recently I discovered an amazing open source project: Caddy, a fully functional HTTP/2 webserver, written in Go. Caddy is a lightweight, general-purpose web server for… Read more »

Go: Interface (example)

An Interface in Go defines a behavior. Interfaces are defined with a number of methods that a type must implement. Once the methods are implemented, the type can be used wherever the interface type is needed. Let’s for example define a Phone interface: type Phone interface { Call() } We also define a Nokia type that… Read more »