Backend API server for USBC Gold Staking Platform
npm installCopy .env.example to .env and update values:
cp .env.example .envDevelopment:
npm run devProduction:
npm start- GET
/api/health- Server health status
- GET
/api/config- Application configuration
- GET
/api/transactions/:signature- Get transaction explorer link - POST
/api/webhook/transaction- Webhook for transaction events
-
Push to GitHub
git init git add . git commit -m "Initial commit" git branch -M main git remote add origin https://github.com/yourusername/usbc-gold.git git push -u origin main
-
Create Render Service
- Go to render.com
- Click "New" → "Web Service"
- Connect GitHub repository
- Select
backenddirectory as Root Directory - Build command:
npm install - Start command:
npm start - Set environment variables from
.env
-
Set Environment Variables
- PORT: 3000
- NODE_ENV: production
- Other variables from
.env
The frontend connects to this backend for:
- Configuration data
- Webhook notifications
- Transaction tracking
backend/
├── server.js # Main Express server
├── package.json # Dependencies
├── .env.example # Environment template
├── .gitignore # Git ignore rules
└── README.md # This file
- Node.js - Runtime
- Express - Web framework
- CORS - Cross-origin support
- Dotenv - Environment management
For issues or questions, please refer to the main project documentation.