# Deploy Fiber

Fiber is detected from your `go.mod` and runs as a Go container on port `8080`. The [generated image](/platform/deployments/builds#dockerfiles-generated-or-your-own) compiles the module and ships the binary.

## Serve it

Listen on the routed [port](/create/build-settings#port) - `PORT` is set to it:

```go
app := fiber.New()
app.Get("/", func(c *fiber.Ctx) error { return c.SendString("up") })

port := os.Getenv("PORT")
if port == "" {
    port = "8080"
}
log.Fatal(app.Listen(":" + port)) // binds 0.0.0.0
```

## Configuration and database

Read [environment variables](/platform/environment-variables#build-time-and-runtime) with `os.Getenv` at startup. `DATABASE_URL` from the [Credentials tab](/platform/databases/connect) works with `pgx`, `database/sql`, and GORM; keep `sslmode=require`.

## Scaling

Compiled binaries cold-start in well under a second - a natural fit for [scale to zero](/create/scaling#min-instances). Fiber's fasthttp core thrives at high [concurrency](/create/scaling#concurrency); the per-size caps are the practical limit.

## Related

- [Go](/platform/frameworks/go): The runtime's defaults for any Go app.
- [Connect an app](/platform/databases/connect): DATABASE_URL, TLS, per-environment databases.
- [Scaling](/create/scaling): Concurrency caps per size.
