One good thing about music, when it hits you, you feel no pain.
tenX uses a centralized configuration system based on environment variables. The default values are suitable for local development, but can be customized by setting environment variables.
Copy the .env.example file to .env to set custom environment variables:
cp .env.example .envThen edit the .env file to customize your configuration.
Key configuration options:
NODE_ENV: Set toproductionfor production environmentMONGODB_URI: MongoDB connection stringMONGODB_DATABASE: MongoDB database namePORT: Application server port
See .env.example for a complete list of available configuration options.
All API endpoints in tenX follow a standardized response format:
{
"success": true,
"data": { ... } // Optional response data
}{
"success": false,
"error": "Human readable error message",
"code": "ERROR_CODE" // Optional error code
}HTTP status codes are also used appropriately:
- 200: Success
- 400: Bad request
- 401: Unauthorized
- 403: Forbidden
- 404: Not found
- 500: Server error