Referral-mongo
version: Beta
Features
- The change the referral chain
- Referral system using mongoDB a distributed General purpose database based on documents
Installation
installing the module
npm i referral-mongo
installing the database
sudo apt install -y mongodb sudo systemctl start mongodb
Сonnection
const createReferal getReferrals updateReferal deleteReferral } =
API create referral without parent
returns a Promise:
API create referral with parent
returns a Promise:
API update referral
returns a Promise:
API delete referral
returns a Promise:
Edit the .env file
REFERRAL_LEVELS=3 // Set the depth of the referral system. By default three.
REFERRAL_MONGODB_URL='mongodb://localhost:27017/referrals' // Database address.
REFERRAL_MONGODB_VERSION=3.6.3 // Version of your database.