0.2.0 • Published 5 years ago
@runspace/daemon v0.2.0
@runspace/daemon
Runspace daemon allows you to create P2P network of nodes for executing @runspace/runtime functions.
Executing functions
See @runspace/cli daemon:broadcast for example.
Functions Examples
Functions Runtime
See it here: @runspace/runtime
Configuration
Configuration is located in user home directory under folder .runspace
and file config.json
Configuration file
$HOME/.devspace/config.json
{
"os": {
"homedir": $HOME,
"user": $USER
},
"network": {
"name": "runspacenet", // Network name
"bridgePort": 65535 // Bridge port
}
}
Installing
Prerequisites
macOS
- Install brew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Install Node.js and Yarn
$ brew install nodejs yarn
- Install pm2
$ yarn global add pm2
- Clone Repository
$ git clone https://github.com/runspacegit/daemon.git runspace-daemon
$ cd runspace-daemon
- Install deps
$ yarn install
- Build daemon
$ yarn build
- Start daemon
$ pm2 start .
- See logs
$ pm2 logs
- Autostart
$ pm2 autostart
$ pm2 save
Ubuntu
- Install Node.js and Yarn
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
$ sudo apt install -y nodejs
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
$ sudo apt install -y yarn
- Install pm2
$ sudo yarn global add pm2
- Clone Repository
$ git clone https://github.com/runspacegit/daemon.git runspace-daemon
$ cd runspace-daemon
- Install deps
$ yarn install
- Build daemon
$ yarn build
- Start daemon
$ pm2 start .
- See logs
$ pm2 logs
- Autostart
$ pm2 autostart
$ pm2 save
Windows
❌⏳ Tutorial Under construction
But it will work under windows.