Home > Web Front-end > JS Tutorial > Tutorial on using node js to display hello world

Tutorial on using node js to display hello world

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2024-08-22 18:58:32
Original
378 people have browsed it

1.dowload node js here

2.
Tutorial memakai node js sampai memunculkan hello world
Click Download

3.and download when it is open in the file manager
Tutorial memakai node js sampai memunculkan hello world
make sure your node version is at least v-20 and make sure the system type is the same as your laptop/PC, for example here the system type is x64

4.and make sure you download git bash

note
-Do not use any tools. just use the default
-terminal using Git - Downloads (git-scm.com)

5.and To make sure Node.js is installed, open Command Prompt (CMD) and type:

Tutorial memakai node js sampai memunculkan hello world
and the version you downloaded will come out and that will ensure that your node js has been downloaded

6.create a directory
project Open a Command Prompt or terminal and create a directory for your project, then go into it:

Tutorial memakai node js sampai memunculkan hello world
7. create a file for example main.js

8.run js file

Tutorial memakai node js sampai memunculkan hello world
9.the results bring up

Tutorial memakai node js sampai memunculkan hello world
10.edit if necessary using

Tutorial memakai node js sampai memunculkan hello world
note
terminal
ls = to view the contents of the folder
ls -a = to see all folder contents including hidden ones
DIR = to view the contents of the folder in Windows
mkdir = create folder
cd = to go to folder
cd .. = to exit folder
touch = to create file (os)
echo 'console.log("hello students")' > main.js (create file)
rm = to delete files (MAC)
del = to delete files (Windows)

Nano / Edit file contents (Only on MAC OS and Linux)
nano = edit file
ctrl + o = save file (enter)
ctrl + x = exit edit file

Node
node -v = view node.js version. minimum version 20
npm -v = to see the npm (package managing) version. minimum version 10

The above is the detailed content of Tutorial on using node js to display hello world. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template