# Status page

The status page feature allows you to monitor the health of your Crowdin app by checking the database and filesystem connections.

## Sample

```js ins={12-16} title="index.js"
    import crowdinModule from '@crowdin/app-project-module';

    const configuration = {
      baseUrl: 'https://123.ngrok.io',
      clientId: 'clientId',
      clientSecret: 'clientSecret',
      name: 'Sample App',
      identifier: 'sample-app',
      description: 'Sample App description',
      dbFolder: import.meta.dirname,
      imagePath: import.meta.dirname + '/logo.png',
      enableStatusPage: {
        database: true,
        filesystem: true,
        rateLimit: 10,
      }
    };

    crowdinModule.createApp(configuration);
    ```
  ```ts ins={13-17} title="index.ts"
    import crowdinModule from '@crowdin/app-project-module';
    import type { ClientConfig } from '@crowdin/app-project-module';

    const configuration: ClientConfig = {
      baseUrl: 'https://123.ngrok.io',
      clientId: 'clientId',
      clientSecret: 'clientSecret',
      name: 'Sample App',
      identifier: 'sample-app',
      description: 'Sample App description',
      dbFolder: import.meta.dirname,
      imagePath: import.meta.dirname + '/logo.png',
      enableStatusPage: {
        database: true,
        filesystem: true,
        rateLimit: 10,
      }
    };

    crowdinModule.createApp(configuration);
    ```
  ## Configuration

| Parameter     | Description                                                      | Default value |
|---------------|------------------------------------------------------------------|---------------|
| `database`    | Enable database connection check in the status page.             | `true`        |
| `filesystem`  | Enable filesystem connection check in the status page.           | `true`        |
| `rateLimit`   | Maximum number of requests allowed to the endpoint per minute    | `10`          |

## Status Page Endpoint

The status page is automatically available at `/status`. It provides a JSON response with the following structure:

```json
{
  "status": "ok",
  "timestamp": "2024-03-21T10:00:00.000Z",
  "database": {
    "status": "ok",
  },
  "filesystem": {
    "status": "ok",
  },
}
```

### Response Fields

- `status`: Overall status of the application
- `timestamp`: Current server timestamp
- `database`: Database connection status
- `filesystem`: Filesystem access status