My Profile Photo

Sheogorath's Blog

Hugo provides an own web server

Today I learned that the hugo server-command can run be used in production. According to the Hugo documentation it’s considered a valid use-case but you might want to disable the live reload feature. It sounds contra intuitive as Hugo itself is a static page generator and one would usually use it to generate a page and then let it be served by another webserver/CDN/….

I came across this when inspecting a Hugo page build process and had to notice that they were using a Hugo container that was running this command instead of putting the content into an nginx container or alike. While first being confused, after consulting the documentation it turned out to be a valid choice.