StreamPay API backend — stream management, usage metering, and settlement services.
Node.js + Express (TypeScript) service that will power the StreamPay API gateway: health checks, stream listing, and (later) metering and Stellar settlement integration.
- Node.js 18+
- npm (or yarn/pnpm)
-
Clone and enter the repo
git clone <repo-url> cd streampay-backend
-
Install dependencies
npm install
-
Verify setup
npm run build npm test -
Run locally
npm run dev # dev with hot reload # or npm run build && npm start
API will be at http://localhost:3001 (or PORT env). Try GET /health and GET /api/streams.
| Command | Description |
|---|---|
npm run build |
Compile TypeScript |
npm start |
Run production build |
npm run dev |
Run with ts-node-dev |
npm test |
Run Jest tests |
npm run lint |
Run ESLint |
On every push/PR to main, GitHub Actions runs:
- Install:
npm ci - Build:
npm run build - Tests:
npm test
Keep the default branch green before merging.
streampay-backend/
├── src/
│ ├── index.ts # Express app and routes
│ └── health.test.ts # API tests
├── package.json
├── tsconfig.json
├── jest.config.js
├── .github/workflows/ci.yml
└── README.md
MIT