# LogtoResource.WithNodeEnv

- Module: [CommunityToolkit.Aspire.Hosting.Logto](/reference/api/go/communitytoolkit.aspire.hosting.logto.md)
- Defined on: [LogtoResource](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource.md)
- Version: `13.6.1`
- Kind: `method`

Configures the Logto resource to use the specified Node.js environment value by setting the corresponding environment variable.

## Definition

```go
type LogtoResource interface {
    // ... omitted for brevity
    WithNodeEnv(env string) LogtoResource
}
```

## Signature

```go
WithNodeEnv(env string) LogtoResource
```

## Parameters

- `env` (`string`) -- The value of the Node.js environment variable to set, typically "development", "production", or "test".

## Returns

[`LogtoResource`](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource.md) -- The resource builder for the configured Logto resource.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [LogtoResource](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource.md) -- `handle`
