Setup¶
Node.js¶
To proceed with this tutorial and start working with JSTP, follow these steps:
- Make sure you have version
6.x
or later of Node.js installed. - Follow the installation instructions for JSTP.
From that point, all dependencies are installed and you are free to use JSTP
by requiring jstp
module:
const jstp = reqiure('@metarhia/jstp');
Browser¶
If you are working in a web browser environment, there is an alternative
UMD bundle, which you can add to your page via a <script>
tag, like
here:
<!DOCTYPE html> <html> <head> <script src="https://unpkg.com/@metarhia/jstp@latest/dist/jstp.umd.js"></script> </head> <body> <!-- Now you can use jstp module here by accessing window.api.jstp --> </body> </html>
Alternatively, you can also use module bundlers like Webpack and Browserify for more convenient development.