JavaScript is designed to run client-side in web browsers, so JavaScript programs cannot run as standalone or server-side applications out of the box. Node.js solves this limitation by providing a runtime environment, allowing JavaScript programs to execute outside of a web browser.
Part 1 of the monero-ts "getting started" guide illustrates the use of Node.js to run a monero-ts program in a unix terminal, so you need to install it to follow the guide.
In addition, Node.js includes the Node Package Manger (npm). npm installs Node modules including the monero-ts module, which is required to use the monero-ts library.
To install Node.js and npm:
- Install node.js by typing
$ sudo apt-get install nodejs
. - Install npm by typing
$ sudo apt-get install npm
.
- Install node.js:
$ sudo dnf install nodejs
- Install npm:
$ sudo dnf install npm
Download and install for your platform: https://web.getmonero.org/downloads/
The starter web application uses a Python command to run its server, so you need to install Python before running the application.
To install Python:
- Open a terminal.
- Use a package manager to download and install Python 3:
$ sudo apt-get install python3
$ sudo dnf install python3