# Node-Red Installation

## **ติดตั้ง Node-Red บน Windows** <a href="#user-content-node-red-windows" id="user-content-node-red-windows"></a>

1. Download และ ติดตั้ง Nodejs จากเว็บไซต์ [Node.js](https://nodejs.org/en/)

<figure><img src="https://1856353139-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MClo3nC-1US0rbK8Qau%2Fuploads%2FOoS2BVHNABbfevz6KQgh%2Fimage.png?alt=media&#x26;token=c0a162e9-f922-4e05-b18e-47e9c143f897" alt=""><figcaption></figcaption></figure>

2. เปิด Command Prompt โดยไปที่ Start>> พิมพ์ `CMD` ในช่องค้นหา
3. ตรวจสอบ version ของ node.js และ npm ที่ได้ติดตั้งไปก่อนหน้า โดยพิมพ์คำสั่ง ดังนี้

```shell-session
$ node --version
$ npm --version
```

<figure><img src="https://1856353139-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MClo3nC-1US0rbK8Qau%2Fuploads%2FAEfYk8hgpFrPs9tsI74r%2Fimage.png?alt=media&#x26;token=1c74d66b-8054-4a5c-bbef-68f88fb628ae" alt=""><figcaption></figcaption></figure>

ติดตั้ง node-red โดย พิมพ์คำสั่ง ติดตั้งด้วย npm ดังนี้

```shell-session
$ npm install -g --unsafe-perm node-red
```

4. เมื่อติดตั้ง node-red ให้ปิด หน้าต่าง Commade Promp แล้วเปิดใหม่
5. พิมพ์ คำสั่ง เปิดใช้งาน node-red ดังนี้

```shell-session
$ node-red start 
```

หลังจาก Run Node-red แล้ว เราสามารถใช้งาน node-red โดยไปที่หน้าเบราเซอร์ของคอมพิวเตอร์ แล้วพิมพ์ IP 127.0.0.1 หรือ คำว่า “localhost” ตามด้วย port 1880 ดังตัวอย่างด้านล่าง

```powershell
http://127.0.0.1:1880
or
http://localhost:1880
```

<figure><img src="https://1856353139-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MClo3nC-1US0rbK8Qau%2Fuploads%2FDx8OiF9hGTnp7PFOkyaT%2Fimage.png?alt=media&#x26;token=a1be62fa-e006-4e45-b4bc-edf5147cdf77" alt=""><figcaption></figcaption></figure>


---

# 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://docs.aic-eec.com/biil_psoc6/iot-connectivity-and-data-analytics-via-node-red/node-red-installation.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.
