# Environment Setup

\ <br>

### Local Environment Setup

> Text Editor & The Node.js binary installable

<br>

#### Linux

> Debian

```bash
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
```

<br>

> Redhat

```bash
sudo yum install epel-release
sudo yum install nodejs
sudo yum install npm
```

\ <br>

#### Verify installation: Executing a File

: Create a JavaScript file named **main.js** on your machine (Windows or Linux) having the following code.

<br>

> main.js

```javascript
console.log("Hello, Node.js!")
```

<br>

> Execute main.js file using Node.js interpreter to see the result

```bash
$node main.js
```

<br>

> Result

```bash
Hello, Node.js!
```

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chloe-codes1.gitbook.io/til/node.js/node.js-101/02_environment_setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
