# App Server

{% hint style="info" %}
A React frontend connected to a Node backend is a rock-solid combination for any application.

Connecting React.js to Node.js involves setting up a client-server architecture where React.js serves as the front-end (client) and Node.js serves as the back-end (server) of your application. This allows your React.js application to make requests to the Node.js server to fetch data or perform other server-side operations.
{% endhint %}

{% hint style="danger" %}
The following guide is intended to highlight the flow of requests from the client front-end to the back-end.&#x20;

**Please do not modify any files**.
{% endhint %}

<figure><img src="/files/GUZB1Z0NbiUoDpbhskK0" alt=""><figcaption><p>Application Server - Front End / Back End</p></figcaption></figure>

{% tabs %}
{% tab title="Install nano" %}
{% hint style="info" %}
Before you can update the package index or install Vim or Nano, you need to identify the Linux distribution used in the Docker container.
{% endhint %}

1. Log into Portainer either by clicking on the bookmark or&#x20;

   [**https://localhost:9443/#!/auth**](https://localhost:9443/#!/auth)
2. Enter credentials.

<table data-header-hidden><thead><tr><th width="148"></th><th></th></tr></thead><tbody><tr><td>Username</td><td>admin</td></tr><tr><td>Password</td><td>Portainer123</td></tr></tbody></table>

3. Click on 'Live Connect' option.
4. Click on: pdc-fe-1 container

<figure><img src="/files/MgX3nlWMTQuElesyGpEJ" alt=""><figcaption><p>pdc-fe-1</p></figcaption></figure>

5. Exec into the container.

<figure><img src="/files/4X9z0N4hBNBYYDcu3WlW" alt=""><figcaption><p>Exec into pdc-fe-1 container</p></figcaption></figure>

6. Determine the contaner OS.

```bash
cat /etc/os-release
```

7. Install nano.

```bash
apt-get update && apt-get install nano -y

```

<figure><img src="/files/1mJSg7YfuEUEp5IM4aGM" alt=""><figcaption><p>Install nano</p></figcaption></figure>
{% endtab %}

{% tab title="Front End / Back End" %}

#### Front End React

{% hint style="info" %}
One of the main features of React is client-side routing:

In traditional websites, the browser requests a document from a web server, downloads and evaluates CSS and JavaScript assets, and renders the HTML sent from the server. When the user clicks a link, it starts the process all over again for a new page.

Client side routing allows your app to update the URL from a link click without making another request for another document from the server. Instead, your app can immediately render some new UI and make data requests with `fetch` to update the page with new information.
{% endhint %}

x

x
{% endtab %}
{% endtabs %}


---

# 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://academy.pentaho.com/pentaho-data-catalog-en/setup/components/app-server.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.
