1.1 KiB
1.1 KiB
Koin Ping Backend
On-chain monitoring and alerting system backend.
Environment Variables
Create a .env file in the backend directory with the following variables:
PORT=3001
NODE_ENV=development
# PostgreSQL Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=koin_ping
# Blockchain RPC Endpoints (examples)
ETH_RPC_URL=https://mainnet.infura.io/v3/YOUR_INFURA_KEY
POLYGON_RPC_URL=https://polygon-rpc.com
# Polling Configuration
POLL_INTERVAL_MS=10000
Getting Started
-
Install dependencies:
npm install -
Set up your
.envfile with the required environment variables -
Run the development server:
npm run dev -
Run in production:
npm start
Project Structure
api/- API endpoints and server configurationpoller/- Blockchain polling logicalerts/- Alert evaluation and managementnotifications/- Notification delivery systemdomain/- Domain models and business logicinfra/- Infrastructure (database, external services)shared/- Shared utilities and helpers