A simple nodejs webserver serving christmas snow on demand and showing up configure snap options
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
meta/hooks
.gitignore
LICENSE
README.md
main.js
package.json
snapcraft.yaml
snow.gif

README.md

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.