A Node.js server that provides TronLink data receiving API.
- 🚀 Express.js server
- 📡 POST
/tronlinkendpoint to receive TronLink data - 🏥 Health check endpoint
- 🔒 CORS support
- 📝 Request logging
npm installnpm run devnpm startServer will start at http://localhost:3000
Receive TronLink data
Request Body Example:
{
"actionId": "e5471a9c-b0f1-418b-8634-3de60d68a288",
"address": "TSPrmJetAMo6S6RxMd4tswzeRCFVegBNig",
"code": 0,
"id": 1780812177,
"message": "success"
}Response Example:
{
"success": true,
"message": "Data received successfully",
"data": {
"actionId": "e5471a9c-b0f1-418b-8634-3de60d68a288",
"address": "TSPrmJetAMo6S6RxMd4tswzeRCFVegBNig",
"code": 0,
"id": 1780812177,
"message": "success",
"receivedAt": "2024-01-01T00:00:00.000Z",
"status": "success"
}
}Health check endpoint
Response Example:
{
"status": "healthy",
"timestamp": "2024-01-01T00:00:00.000Z",
"uptime": 123.456
}Test TronLink endpoint using curl:
curl -X POST http://localhost:3000/tronlink \
-H "Content-Type: application/json" \
-d '{
"actionId": "e5471a9c-b0f1-418b-8634-3de60d68a288",
"address": "TSPrmJetAMo6S6RxMd4tswzeRCFVegBNig",
"code": 0,
"id": 1780812177,
"message": "success"
}'PORT: Server port (default: 3000)