/balena-haskell-hello-world

Example of how to deploy haskell code on a balena supported device.

Primary LanguageShellApache License 2.0Apache-2.0

A Simple Server with Haskell Snap

balena deploy button

This is a simple skeleton Haskell 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 haskell powered web server running on your device and you can see some logs on your device dashboard.

cd balena-haskell-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!