You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/server-side/nodejs.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,20 @@ This should print the version number of Node.js like this:
26
26
```bash
27
27
v20.7.0
28
28
```
29
+
## Running the Node.js REPL
30
+
31
+
REPL stands for Read Evaluate Print Loop, and allows you to run code from the terminal.
32
+
Type into your terminal this command:
33
+
34
+
```bash
35
+
node
36
+
```
37
+
In this prompt, you can run code, like this:
38
+
39
+
```js
40
+
>console.log("Hello World")
41
+
```
42
+
You can leave the REPL by typing CTRL + d
29
43
30
44
## Writing your first Node.js program
31
45
@@ -51,7 +65,13 @@ Hello World!
51
65
52
66
Express is a popular web framework for Node.js. It provides a simple and elegant API for building web applications. Let's use Express to create a simple web server that will respond to HTTP requests with a "Hello World!" message.
53
67
54
-
First, we need to install Express. To do this, run the following command in your terminal:
68
+
But before we install Express, we must first run this in order to set up npm, javascript's package manager:
0 commit comments