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

yunkong2.js-controller

v1.5.2

Published

Updated by reinstall.js on 2018-06-11T15:19:56.688Z

Downloads

9

Readme

Logo

yunkong2.js-controller

==================

NPM version Downloads Tests

NPM

Here you can find change log.

This is a main controller, that starts all other yunkong2 adapters.

Official Web-Site: http://yunkong2.net

Forum: http://forum.yunkong2.net

Trello: https://trello.com/b/q0SZKdfW/yunkong2-whiteboard

yunkong2 wiki: https://github.com/yunkong2/yunkong2/wiki/Home-(English)

Explanation of the concept: https://github.com/yunkong2/yunkong2


This is a Javascript/Node.js implementation of an yunkong2 controller.

Manual installation of yunkong2.js-controller on Debian based Linux (Raspbian, Ubuntu, ...)

Install Node.js

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install curl build-essential
sudo curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
sudo apt-get install -y nodejs

Install yunkong2 on linux

sudo mkdir /opt/yunkong2
sudo cd /opt/yunkong2
sudo chmod 777 /opt/yunkong2
sudo npm install yunkong2 --unsafe-perm

After that the yunkong2 should run and be available in browser under http://<ip>:8081/

Start yunkong2 controller on linux

  • run ./yunkong2 start in the yunkong2 directory to start the yunkong2 controller in the background
  • watch the logfile tail -f log/yunkong2.log

or

  • run node node_modules/yunkong2.js-controller/controller.js to start the yunkong2 controller in foreground and watch the log on console

Install js-controller on windows

  • Create and change to the directory under which you want to install yunkong2.

    mkdir C:/yunkong2 cd C:/yunkong2

  • install npm packet from created directory

    npm install yunkong2

Start yunkong2 controller on windows

  • run yunkong2 start in the yunkong2 directory to start the yunkong2 controller in the background console
  • check the logfile node_modules/yunkong2.js-controller/log/yunkong2.log

or

  • run node node_modules/yunkong2.js-controller/controller.js to start the yunkong2 controller in foreground and watch the log on console

Admin UI

The admin adapter starts a web-server that hosts the Admin UI. Default port is 8081, so just open http://<yunkong2>:8081/ If port 8081 is occupied, you can install second Admin UI on alternate port and change port for first admin UI:

  • run ./yunkong2 add admin --enabled --port 8090 and go to the http://<yunkong2>:8090/. Of course you can change port 8090 to other one.

Using REDIS as States-DB

There is a possibility to use REDIS as states database. It is reasonable to do that for big installations or for systems with performance problems. It is possible to switch anytime between REDIS and In-Memory Javascript DB. The only problem, that all states must be updated by adapters again (values will be lost). Objects and configuration are not affected.

To install REDIS on linux/debuan just write: apt-get install redis-server .

If you plan to use mulithost installation you must allow connections to redis from any address (default only 127.0.0.1). To do that edit file /etc/redis/redis.conf (sudo nano /etc/redis/redis.conf) and replace bind 127.0.0.1 with bind 0.0.0.0 . Don't forget to restart redis after that. (sudo /etc/init.d/redis-server restart)

To install on windows download latest release here https://github.com/MSOpenTech/redis/releases.

To switch to REDIS write in the console following:

>yunkong2 stop
>yunkong2 setup custom

And then:

Type of objects DB [file, couch, redis], default [file]:
Host of objects DB(file), default[127.0.0.1]:
Port of objects DB(file), default[9001]:
Type of states DB [file, redis], default [file]: redis
Host of states DB (redis), default[127.0.0.1]:
Port of states DB (redis), default[6379]:
Data directory (file), default[../../../yunkong2-data/]:
Host name of this machine [FastPC]:
creating conf/yunkong2.json

Note that in fourth line it was entered redis.

Now yunkong2 can be started. Of course redis must be first installed and firewall rules must be checked.

To switch back to JS States write the same commands again, just instead of redis in fourth line write nothing and press ENTER.

License

The MIT License (MIT)

Copyright (c) 2014-2018 bluefox [email protected],

Copyright (c) 2014 hobbyquaker