F11
and then CTRL-L
and enter the website you want to display in this case it will be http://localhost:3000 (URL of node-build-monitor)To install and manage node version install NVM:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Install node v10.11.0
nvm install v10.11.0
Clone and setup code:
sudo apt install git git clone https://github.com/marcells/node-build-monitor.git cd node-build-monitor npm install
Add config:
Open node-build-monitor/app/config.json
and add the following config to services
section:
{ "name": "GitLab", "configuration": { "url": "http://gitlab.example.com:8080", "token": "secret_user_token", "additional_query": "&search=gitlab-org&starred=true", "numberOfPipelinesPerProject": 3, "slugs": [ { "project": "gitlab-org/gitlab-ci-multi-runner", "ref": "master" } ] } }
Start node-build-monitor using npm run start
and open http://localhost:3000 in your Pis browser
To run it on boot insert this in /etc/rc.local
before exit 0
:
/home/pi/.nvm/versions/node/v10.11.0/bin/node /home/pi/node-build-monitor/app/app.js &
The &
will make this process run in background. The node version in your path depends on the version you installed.
#!/bin/bash echo "Install nvm ..." wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" echo "Install node ..." nvm install v10.11.0 echo "Install node-build-monitor" sudo apt install git cd ~/ git clone https://github.com/marcells/node-build-monitor.git cd ./node-build-monitor npm install echo "Done ..."