1) COMMON : MESSAGE OGS MODERATORS
2) COMMON : GENERATE THE APIKEY
- 3A1) Download and install nodejs and npm
- 3A2) Install gtp2ogs.js with npm
- 3A3) Recommended : Upgrade gtp2ogs.js from old branch to “devel” branch (latest)
- 3A4) Optional : Edit the gtp2ogs.js file (for example show winrate on OGS)
- 3A5) Run gtp2ogs.js (beta)
- 3A6) Run gtp2ogs.js (official)
- 3B1a) Preparations
- 3B1b) Download and install nodejs
- 3B2) Install gtp2ogs.js
- 3B3) Recommended : Upgrade gtp2ogs from old branch to devel (latest) branch
- 3B4) Optional : Edit the gtp2ogs.js file (for example show winrate on OGS)
- 3B5) Run gtp2ogs.js (beta)
- 3B6) Run gtp2ogs.js (official)
This tutorial uses Ubuntu 20.04 as an example, but it works the same in any compatible linux distribution.
To install node.js, apt package manager only provides an old version
of nodejs, so the recommended way to install node.js for ubuntu 20.04
and higher is to use nvm
(Node Version Manager).
First, download and install the latest version of nvm
by downloading and runnning install.sh
from nvm's github
For example, as of today:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.33.8/install.sh | bash
Then finalize the install by updating your shell environment
source ~/.profile
You can check nvm is installed by running nvm -v
.
Then, display all available node versions that can be installed by running
nvm ls-remote
In this tutorial i'll be choosing node version 14 because it is the soon to be LTS at the time of writing this tutorial, and it adds support for a recent addition to the javascript language that i want (nullish coalescing)
Generally, unless there is a specific need, it is advised to go either with latest LTS or latest beta version available depending on your needs. You can also check node.js releases status here.
So, scrolling all available versions result all the way down until the bottom...
In this example, i'm running nvm install 14.2.0
(latest node 14 available)
Finally, we can make sure node
and npm
were successfully installed by running node -v
and npm -v
.
You may want to upgrade to a more recent node version, or go do the opposite and test an older version for compatibility or debugging purposes.
To do that, just do nvm install <version_number>
to install (if not already installed)
and switch to using the specified <version_number>
For example, to use node 14.0.0
instead of 14.2.0
i have to run nvm install 14.0.0
To revert it back, just do the opposite, for example nvm install 14.2.0
to use
node version 14.2.0 again)
It is a good idea to upgrade nvm
to latest available version whenever you want to use it (modify node version for example, as seen above)
For example, at the time i am updating this tutorial, nvm
latest version is not anymore 0.33.8
but is now 0.35.2
To do that, just run the nvm install again as we saw at the begining:
- install latest
install.sh
from nvm's github - update shell environment with
source ~/.profile