Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 1.86 KB

README.md

File metadata and controls

26 lines (17 loc) · 1.86 KB

A Simple server with Go net/http package

balena deploy button

This is a simple skeleton Go server project that works on any of the devices supported by balena.

This project serves up a welcome page on port :80 of your balena device.

To get this project up and running, you will need to sign-up for a balena account. Have a look at our Getting Started tutorial to help you kickstart your journey in creating a fleet of devices. Once you are set up with balena, you will need to clone or download this repository.

After downloading, navigate to the directory and run the balena push command using the balena CLI. This command will package up and push the code to the balena builders, where it will be compiled, built and deployed to every device in the fleet. When it completes, you'll have a Go powered web server running on your device and you can see some logs on your device dashboard.

cd balena-go-hello-world/
balena push <FLEET_NAME>

To give your device a public URL, access the device page on the balenaCloud dashboard, and choose the Public Device URL toggle. Once the device is updated, check the Public Device URL to find the welcome page showing up from your device. That's it, you have deployed your first balena device!