npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hrui

v1.0.0

Published

HTML5 Robot User Interface Server

Downloads

10

Readme

#HTML5 Robot User Interface Server ####An ASLab Project, ####Developed by Daniel Peiró ####ETSII, UPM 2014-2015

##Quick Instructions ######(Detailed instructions follow):

#####1. Install nodejs, npm. #####2. Install avconv (Optional, see below). #####3. Install MongoDB and start service. #####4. CD to HTML5RUI dir and enter:

$ mongo utils/hruiconfig.js
$ npm install
$ npm start

###Detailed Installation Instructions (Debian/Ubuntu/Mint):

#####1. Install nodejs, npm: $ sudo apt-get install nodejs npm

On some systems (i.e. 32-Bit, Debian), nodejs-legacy package may also be required.

#####2. Install avconv/ffmpeg (Optional, required for media streaming):

$ sudo apt-get install libav-tools

Or

$ sudo apt-get install ffmpeg

If you wish to use ffmpeg instead of avconv, change parameter AVCONV in config.json or app.js to 'ffmpeg' so the app calls ffmpeg instead of avconv.

#####3. Install MongoDB: Get software source (use method of your choice):

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
$ echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

Update package list:

$ sudo apt-get update

Install mongodb and start service:

$ sudo apt-get install -y mongodb-org
$ sudo service mongod start

To check if mongodb was installed correctly, run mongo shell:

$ mongo

#####4. CD to HTML5RUI directory.

#####5. Configure MongoDB (For Data Monitor Module and Geolocation out of the box):

$ mongo utils/hruiconfig.js

Alternatively, backup/restore a working db with mongorestore.

#####6. Install app and run:

$ npm install
$ npm start	

#####Optional: Use PM2 to monitor/manage server (Recommended).

$ npm install pm2 -g
$ pm2 start bin/start 
$ pm2 logs/monit/stop 0/start 0/...(see PM2 documentation)

#####Notes on using port 80: ######The app is setup to use port 80 by default (makes for a 'prettier' URL). ######Using standard HTTP Port 80 (or any other port < 1024) requires root privileges. ######If user is not root, an EACCES error will be thrown on app start (using sudo will work, but is a security risk, as it grants full rights and capabilities to node). ######To use a different port (greater than 1024), Open app.js and modify the PORT Parameter (should not be the same as other XXXPORT Parameters), save changes and restart app if necessary. ######The server can then be reached at:

http://localhost:XXXX/

######where XXXX is the chosen PORT. (i.e. for PORT=8080; http://localhost:8080)

#####How to use port 80: My preferred method uses setcap to grant node.js the capability to bind to port<1024:

$ sudo apt-get install libcap2-bin
$ sudo setcap cap_net_bind_service=+ep /usr/local/bin/node

To revert, simply:

$ sudo setcap cap_net_bind_service=-ep /usr/local/bin/node

This only gives node the ability to bind to ports < 1024, keeping all other restrictions intact. There are several other ways to use or redirect Port 80 without root privileges.

###Installation (Windows):

The server is meant to be deployed on Linux.

It can be installed on Windows, but it's not recommended as installation is cumbersome (not of the app itself, dependencies) and some features aren't available (namely: Live Media and Script Execution).

#####1. Install NodeJS from http://nodejs.org/ . Make sure NPM package manager is installed (it is by default). #####2. Install MongoDB from http://www.mongodb.org/downloads #####3. Configure MongoDB: See linux. #####4. Install HTML5RUI:

  • Open cmd in HTML5RUI directory.

npm install ```

  • (Optional) Install app as windows service (daemonize and keep running):

    • Install node-windows (globally):
    >npm install -g node-windows
    • Open cmd in HTML5RUI/winutils.
    >node winsvc install name
    • Other actions:
    >node winsvc uninstall name
    >node winsvc start name
    >node winsvc stop name

    (where "name" is the name the service will have/has)

  • (Optional) or use PM2 for Windows

#####5. Run app manually (if not installed as service/not using PM2):

  • Open cmd in HTML5RUI directory:
>npm start

#####Possible issues with Windows installation:

  • npm error when trying to install (missing folder npm): Create folder manually (normally in AppData/Roaming/npm).
  • MongoDB error (missing data/db/): Create folder manually where the database will be stored (use of MongoDB installation folder recommended).
  • npm, node, mongod and mongo should be in your PATH if you don't want to specify it each time you use them.

##Usage ####See User Manual