Status page
The status page feature allows you to monitor the health of your Crowdin app by checking the database and filesystem connections.
Sample
const crowdinModule = require('@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: __dirname, imagePath: __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 | true |
Status Page Endpoint
The status page is automatically available at /status
. It provides a JSON response with the following structure:
{ "status": "ok", "timestamp": "2024-03-21T10:00:00.000Z", "database": { "status": "ok", }, "filesystem": { "status": "ok", },}
Response Fields
status
: Overall status of the applicationtimestamp
: Current server timestampdatabase
: Database connection statusfilesystem
: Filesystem access status