Skip to content

Node js app for raspberry pi for monitoring your internet speed

License

Notifications You must be signed in to change notification settings

mpacheco12/speedLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

speedLogger

Node js app for raspberry pi for monitoring your internet speed

prerequisites

You should have this installed on your system.

Installation

$ git clone https://github.com/mpacheco12/speedLogger
$ cd speedLogger
$ npm install

Running

$ node index.js

Run speedlogger as a service

To run it as a service, we are firstly going to create a file in the /etc/init.d/ folder to have our own service. Let’s create a speedLogger file:

$ sudo nano /lib/systemd/system/speedLogger.service

And put the following content:

[Unit]
Description=SpeedLogger Service

[Service]
Type=idle
ExecStart=/usr/bin/node <path_to_this_repo>/index.js
Restart=always
RestartSec=10
Environment=PORT=3001
WorkingDirectory=<path_to_this_repo>            

set permissions and enable the service we've just created:

$ sudo chmod 644 /lib/systemd/system/speedLogger.service 
$ sudo systemctl daemon-reload
$ sudo systemctl enable speedLogger.service

To start the server, simply type:

$sudo systemctl start speedLogger.service

About

Node js app for raspberry pi for monitoring your internet speed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published