No description
Find a file
Didier Roche 8edb052508 Merge pull request #1 from blunden/master
Update the README
2016-12-09 13:52:19 +01:00
meta/hooks Handle empty value from snapctl 2016-11-24 15:24:02 +01:00
.gitignore Add snap gitignore 2016-11-23 16:36:53 +01:00
LICENSE Initial commit 2016-11-23 16:33:48 +01:00
main.js Immediately force restarting webserver on configuration change 2016-11-24 17:31:09 +01:00
package.json Add nodejs server 2016-11-23 16:35:01 +01:00
README.md Update the README 2016-12-09 13:43:30 +01:00
snapcraft.yaml Add configure hook script to the snap 2016-11-24 10:28:33 +01:00
snow.gif Animated gif asset 2016-11-23 16:35:14 +01:00

snow-on-me-snap

A simple nodejs web server serving christmas snow on demand and an example of a configurable snap module

Setup your rpi2/3

  1. Install ubuntu core on your raspberry Pi.
  2. Install this web server snap: sudo snap install snow-on-me
  3. Install the oxide fullscreen webview: sudo snap install oxide-digitalsignage --devmode --channel=beta
  4. Change boot configuration file and give it enough GPU RAM for displaying web pages: sudo mount -o remount,rw /boot/uboot
  5. Edit /boot/uboot/config.txt and add one line:
gpu_mem=448 

Then reboot.

Launching it

The web server will be launched automatically as a nodejs service when your PI starts.

You can launch a full screen web browser directly on the pi (once connected to a display) and connect it to this webserver:

/snap/bin/oxide-digitalsignage.start-oxide --url="http://localhost"

Note that you can also access the web server from a browser on another machine using the IP of your Pi.

Configure port and title

You can configure the port and web page title via the snap configure hook.

This one is executing on install and upgrade, and you can change parameters with:

snap set snow-on-me port=8080 title="Don't catch a cold with that snow"

Of course, you can set just one of those parameters if you like. They will be picked up by the nodejs daemon and refreshed automatically. You will need to refresh the page in your browser.