1.10.0 • Published 8 months ago

sb-license-backend v1.10.0

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
8 months ago

sb-payment-proxy

standard-readme compliant

bamboo

Payment proxy for backend

Environments urls

EnvStatusURL
DEVnpm.iohttps://wallet-DEV.sportsbroker.EU
TESTnpm.iohttps://wallet-TEST.sportsbroker.EU
STAGEnpm.iohttps://wallet-STAGE.sportsbroker.EU
UATnpm.iohttps://wallet-UAT.sportsbroker.app
PRODnpm.iohttps://wallet.sportsbroker.com

Table of Contents

Background

This application is responsible about handling transactions between Backend ()

Install

Production build

npm install
npm run build

Development

tsc -w

node dist/workers/ipn.worker.js
node dist/main.js

Documentation

API documentation is available under {{HOST}}/api/docs

Code documentation is available when run npm run docs:start in localhost:8080

General flow

general-1

Usage

  1. Download ngrok
  2. Run ngrok http PORT

    Set PORT to API port

  3. Get HTTP Forwarding URL (http://subdomain.ngrok.io) and set APP_DOMAIN value to it

  4. Copy .env.example to .env and configure variables
  5. Run processes
$ node dist/wallet/ipn/ipn.context.js
$ node dist/main.js

Ensure that VPN is running

Cron jobs

$ node dist/crons/cancel-pending-transactions.cron.js

Above CRON job cancels every pending deposit transactions.

Maintainers

@sportsbroker

Contributing

How to commit

Actually there are 2 ways to do that, first automated where you will be asked questions about commit and second manual where you could build your commit message by yourself.

  • Automated: npm run commit
  • Manual: git commit

On each of this ways we are checking if commit message is in conventional commits format unless you pass --no-verify which is highly NOT recommended.

How to release

Currently you could do that in 3 ways:

  • npm run release - which bump version in base of all commits that have been created from nearest release following by this rules.
  • npm run release:pre - add to your code version additional number if your code is 1.0.0 and has patched changes than this will tag your version 1.0.1-0. If you would like to have prefix just pass npm run release:pre -- alpha and than your version will be 1.0.1-alpha.0
  • npm run release:patch - force to bump only patch number

License

Own © 2020 Sportsbroker