Code Monkey home page Code Monkey logo

snapweb's Introduction

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

snapweb's People

Contributors

sergiusens avatar stevenwilkin avatar barrymcgee avatar mvo5 avatar come-maiz avatar alexandreabreu avatar chipaca avatar lool avatar bartaz avatar iahmad9 avatar marcustomlinson avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.