# Fiber

### 1. 개요

> Fiber는 Go 언어를 위한 웹 프레임워크로 빠른 성능과 간단한 사용법을 강조하며\
> Express.js와 유사한 API를 제공하고 있습니다.\
> 자세한 설명은 [Fiber 공식 문서](https://docs.gofiber.io/)를 통해 확인해주시길 바랍니다.

AppPaaS에서는 Fiber 2.10.0, Go 1.22.5를 지원합니다.

### 2. 서비스 환경설정

<figure><img src="/files/zscuVuk8QTxpT47KW7Mg" alt=""><figcaption></figcaption></figure>

* **내부 포트**\
  서비스가 배포된 후 리슨되는 포트를 의미합니다. \
  3000 포트가 사용되며 소스 내에서 해당 포트를 변경했을 경우 변경한 값을 입력해 주어야 합니다.\
  AppPaaS Beta에서는 해당 포트를 기반으로 TCP 헬스체크를 합니다.<br>
* **외부 포트, 외부 포트 공개 여부**\
  서비스를 퍼블릭으로 오픈할지 여부를 결정하는 설정입니다. \
  기본으로 443, 오픈으로 설정되어 있으며 오픈 설정 시 외부 도메인이 할당되어 \
  https\://{할당된 주소}를 통해 외부에서 접근할 수 있습니다. \
  비공개로 설정할 경우 외부에서 접근이 불가능하며 내부 도메인 주소로 서비스 간 통신만 지원됩니다.<br>
* **자동 배포 설정**\
  자동 배포를 설정하면 리포지터리의 선택한 브랜치에 변경이 생길 경우 \
  변경에 대한 훅을 받아 자동으로 빌드 및 배포가 진행됩니다.

### 3. 고급  환경설정

***

* **빌드 명령어**\
  디폴트로 `go build -o bin/server`가  수행됩니다. 수정이 필요할 경우 해당 값을 오버라이드 할 수 있습니다.

{% hint style="info" %}
AppPaaS의  Fiber 빌드 시 시스템에서 bin/server로 기본 적용되며 변경 불가능 합니다.
{% endhint %}

* **설치 명령어**\
  디폴트로 `go mod download -x` 가 수행됩니다. 수정이 필요할 경우 해당 값을 오버라이드 할 수 있습니다.<br>
* **환경 변수**\
  Key/Value 형태로 입력되며 입력된 값은 컨테이너 OS의 환경 변수로 주입됩니다.\
  주입된 환경 변수는 코드 내에서 process.env을 통해 접근하여 사용할 수 있습니다.


---

# 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.apppaas.com/start/framework/fiber.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.
