Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 1.48 KB

challenge_016.md

File metadata and controls

72 lines (47 loc) · 1.48 KB

Connect a node validator for sending notifications through Notifi

Getting credentials

I got credentials on my e-mail on the second day after completeng form by link shared #integration-requests in Discord channel.

img

To complete the task I have created Node.js script and shared it in repository: https://github.com/ruziev-dev/notifi-near-integration

Apply script

git clone https://github.com/ruziev-dev/notifi-near-integration.git

cd notifi-near-integration

npm i

Create .env file by example example.env and set credentials

cp example.env .env

nano .env
POOL_ID="timur.factory.shardnet.near"
NODE_IP=127.0.0.1
SID=******************************
SECRET='****************************************'
TOPIC=*******************************
npm run build
node build/index.js

Everething is ok I got e-mail message

img

Add task by crontab

which node

# use this path to in crontask
> /usr/bin/node

Add chron task midnight

crontab -e

Add this row with setting path to Node.js and script

0 0 * * * cd /home/timur/notifi-near-integration && /usr/bin/node build/index.js > /dev/null 2>&1
⏮ Challenge 014 Challenge 019 ⏭