Skip to content
/ snapweb Public
forked from canonical/snapweb

Beautiful and functional interface for snap management

License

Notifications You must be signed in to change notification settings

kwm14/snapweb

 
 

Repository files navigation

Build Status Coverage Status

Building

Prerequisites

This assumes you have a working go environment with a GOPATH env var setup, and nodejs and npm installed:

sudo apt install nodejs-legacy npm

Install global npm modules without sudo:

cat > ~/.npmrc <<-EOF
root = $HOME/node/lib/node_modules
prefix = $HOME/node
binroot = $HOME/node/bin
manroot = $HOME/node/man
EOF

Setup the environment:

mkdir ~/node
export PATH=$PATH:$HOME/node/bin
export NODE_PATH=$HOME/node/lib/node_modules

Branch:

mkdir -p $GOPATH/src/github.com/snapcore
cd $GOPATH/src/github.com/snapcore
git clone [email protected]:snapcore/snapweb.git
cd snapweb

Install:

npm install -g --prefix=$(npm config get prefix) gulp
npm install

Building

cd $GOPATH/src/github.com/snapcore/snapweb
./build.sh

Installing

Once you have a snap you can transfer it onto a running snappy system and from there install it by running:

 sudo snap install [snap]

Using

Given that the snappy system where it was installed on was created with

 kvm -m 768 -redir :8022::22 -redir :4200::4200 -hda snappy.img

Then pointing the browser to [http://localhost:4200] will take you to the portal.

API

/api/v2/packages/

To install a package:

 curl -H "Content-Type: application/json" -d '{"package":"xkcd-webserver"}' http://localhost:4200/api/v2/packages/

To uninstall a package:

curl -X DELETE http://localhost:4200/api/v2/packages/xkcd-webserver

To list packages:

 curl http://localhost:4200/api/v2/packages/

To get a specific package:

 curl http://localhost:4200/api/v2/packages/xkcd-webserver

Dependencies handling

To generate dependencies.tsv you need godeps, so

go get launchpad.net/godeps

To obtain the correct dependencies for the project, run:

godeps -t -u dependencies.tsv

If the dependencies need updating

godeps -t ./... > dependencies.tsv

About

Beautiful and functional interface for snap management

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 36.0%
  • Go 35.1%
  • HTML 19.0%
  • CSS 6.9%
  • Shell 3.0%