This example shows how to build a nodejs web server. This enables us to
demonstrate how service works, basic confinement rules to access and listen
on the network, as well as the nodejs snapcraft plugin.
Enable snaps on Arch Linux and install chuck-norris-webserver-classic
Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.
Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions.
Enable snapd
On Arch Linux, snap can be installed from the Arch User Repository (AUR).
The manual build process is the Arch-supported
install method for AUR packages, and you’ll need the prerequisites
installed before you can install any AUR package. You can then install snap with the following:
git clone https://aur.archlinux.org/snapd.git
cd snapd
makepkg -si
Once installed, the systemd unit that manages the main snap communication socket needs to be enabled:
sudo systemctl enable --now snapd.socket
If AppArmor is enabled in your system, enable the service which loads AppArmor profiles for snaps: