> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AppSignal voor Node.js-configuratie

In dit hoofdstuk leggen we uit hoe u AppSignal configureert, wat u in het Node.js-pakket kunt configureren en wat de minimaal benodigde configuratie is.

## Minimaal vereiste configuratie

De minimaal vereiste configuratie die AppSignal voor Node.js nodig heeft, bestaat uit de volgende items. Als deze niet aanwezig zijn, stuurt AppSignal geen gegevens naar AppSignal.com.

* Een geldige Push API-sleutel
* Een applicatienaam
* Een applicatieomgeving (`development`/`production`/`test` door `NODE_ENV` in te stellen)
* De instelling `active: true`

De integratie ondersteunt het laden van zijn configuratie via opties die aan de `Appsignal`-constructor worden doorgegeven. We raden aan een `appsignal.cjs`-bestand te maken om AppSignal te requiren en te initialiseren.

<CodeGroup>
  ```javascript Node.js theme={null}
  // appsignal.cjs
  const { Appsignal } = require("@appsignal/nodejs");

  new Appsignal({
    active: true,
    name: "<YOUR APPLICATION NAME>",
    pushApiKey: "<YOUR API KEY>",
  });
  ```
</CodeGroup>

U kunt de agent ook configureren via systeemomgevingsvariabelen. AppSignal wordt automatisch actief als de omgevingsvariabele `APPSIGNAL_PUSH_API_KEY` is ingesteld.

<CodeGroup>
  ```bash Bash theme={null}
  export APPSIGNAL_PUSH_API_KEY="<YOUR API KEY>"
  export APPSIGNAL_APP_NAME="<YOUR APPLICATION NAME>"
  export APPSIGNAL_APP_ENV="production"
  ```
</CodeGroup>

## Configuratie-opties

Lees over alle configuratie-opties op de [opties-pagina](/nodejs/3.x/configuration/options).

## Applicatieomgevingen

Een applicatie kan meerdere omgevingen hebben, zoals "development", "test", "staging" en "production".

Om de fouten en prestatieproblemen die in de "development"-omgeving optreden te scheiden van die in "production", is het mogelijk om de omgeving waarin de applicatie draait in te stellen met de omgevingsvariabele `NODE_ENV`.

Als u AppSignal per omgeving activeert, kunt u de eigenschap `active` van de opties die u aan de constructor doorgeeft, conditioneel instellen:

<CodeGroup>
  ```javascript Node.js theme={null}
  // appsignal.cjs
  const { Appsignal } = require("@appsignal/nodejs");

  new Appsignal({
    active: process.env.NODE_ENV !== "development",
    name: "<YOUR APPLICATION NAME>",
    pushApiKey: "<YOUR API KEY>",
  });
  ```
</CodeGroup>

Dit zal AppSignal ook uitschakelen wanneer u uw tests uitvoert.
