Build a Go (golang) web app on Azure – full tutorial



Build a Go (golang) web app on Azure – full tutorial

Build a Go (golang) web app on Azure - full tutorial

Learn how to build a new Go / golang web app using the Gin web framework and deploy it to Azure App Service with Github Actions without using docker containers.

Support for running Go natively on Kudu / App Service was removed in 2017 (1) but it is possible to natively run it on Windows App Service without containers by updating main.go to read hosting environment variables, monitor for app_offline.htm and use the HttpPlatformHandler HttpModule via web.config.

Get the code here: https://github.com/edandersen/go-azure-appservice

0:00 Building a basic app with the Gin framework
2:22 Creating the Azure App Service and the Github Action to deploy the app
7:20 Adding HTML templating support to the app
9:42 Fixing redeployments by supporting app_offline.htm
11:33 Adding static file support for images
12:45 Testing the final deployed Go app and thanks

#golang #go #azure

(1) https://github.com/Azure/app-service-announcements/issues/45

Thumbnail gopher credits: Gopher 3D render Art by James4K – https://github.com/james4k/gopher. The original Go gopher was designed by Renee French. The design is licensed under the Creative Commons 3.0 Attributions license. Read this article for more details: http://blog.golang.org/gopher.

Comments are closed.