Nine Parsecs from Milwaukee

    rpi-dashboard

    1.0.3 • Public • Published

    rpi-dashboard

    Basic Raspberry Pi Node.js Dashboard

    Usage

    Install globally:

    npm install -g rpi-dashboard
    

    Then to execute:

    rpi-dashboard -p 8000
    

    --port is not mandatory, default value is port 80.

    Our advice is to use a process manager (like PM2):

    sudo pm2 start rpi-dashboard --name="rpi-dashboard" -- -p 8000
    

    Clone the repo

    If you wanna edit the template or something else, clone the repo instead of using npm. In the first lines of index.js you'll find the path to the directory containing templates (./templates). You can customize the template as you like.

        var TEMPLATE_DIR = __dirname+'/templates/';
    
    • Clone the repository on the /home/pi/Desktop/:

        git clone https://roccomuso@github.com/roccomuso/rpi-dashboard.git
      

    Then cd rpi-dashboard and npm install.

    And to run the server on start up:

    • Launch from CLI crontab -e and add the following line:

        @reboot /usr/local/bin/node /home/pi/Desktop/rpi-dashboard/index.js >/tmp/node_output 2>/tmp/node_error
      

    (General console.log and error messages are respectively in /tmp/node_output and /tmp/node_error)

    If you want you can run the dashboard under PM2 and then launch pm2 startup to make it runs on startup.

    • Templating system used: Mustache.js. Every template is in the /templates directory by default.

    Author: Rocco Musolino - hackerstribe.com

    Install

    npm i rpi-dashboard

    DownloadsWeekly Downloads

    9

    Version

    1.0.3

    License

    ISC

    Last publish

    Collaborators

    • roccomuso