1- How to install NodeJS on Linux operating Systems
2- How to create a new Nodejs Project using VS Code
3- How to serve web application using nodejs on VS Code
Hardware: Jetson Xavier NX with DSBOARD-NX2
OS: JetPack 4.5 (L4T-32.5)
Language: NodeJS , C#
Now we will show you how to get started with NodeJS on an Ubuntu 18.04 server. You can install Nodejs in several ways. We will show you how to install using apt package manager.
First, open terminal and type the following command:
Secondly, update the apt and then install NodeJS from the repository. To do this type following command:
Then, install NodeJS. We can also install Nodejs Package Manager, it is called npm. Npm Package Manager can allow you to install modules and package to use with NodeJS. You can do this by typing the following command:
After the installation of NodeJS and npm Package Manager successfully, then type “nodejs -v”. With that command, we can see which version we have installed, and also we can verify NodeJS installed.
After we have finished the installation process and done with the verification, let’s run a sample js file using a NodeJS. Create a file named app.js and containing the following contents:
Now run our basic web server using the following command and type “http://127.0.0.1:3000“ in any browser, the output will be as follow:
Thank you for reading our blog post.