Skip to content

GitYVR/bepsi-pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bepsi-pi

Code that lives in the bepsi vending machine that does three things:

  • Listens to MATIC/DAI/USDC/USDT payments to PAYMENT_ADDRESS, on payment dispenses bepsi
  • Listens to an LNbits websockets, on payment dispenses bepsi
  • Listens to discord emoji reaction, on reaction dispenses bubbly

This guide was written for Debian 12.

Prerequisites:

sudo apt install git make build-essential

Requires Node.js

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
\. "$HOME/.nvm/nvm.sh"
nvm install 20

Requires Yarn

npm install --global yarn

Install:

git clone https://github.com/GitYVR/bepsi-pi.git
cd bepsi-pi
yarn install

Copy the example environment and fill out the parameters:

cp .env.example .env
nano .env

To test run:

yarn start

Run

To persist bepsi-pi and make it run on startup:

cd ~/bepsi-pi
npm install -g pm2
pm2 start index.js --name bepsi-pi --exp-backoff-restart-delay=100
pm2 startup

pm2 will then issue you a command that will generate and install a systemd file for your system. Run this command and restart your machine to test this.

Useful commands:

pm2 list
pm2 monit

To see logs:

pm2 logs bepsi-pi

About

PI that lives in the Bepsi machine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •