This guide is for everyone who want to contribute or who want to run a personal instance of Midnabot. If you need help or you want to report a bug, just open an issue.
This repository uses standard
to maintain code style and consistency,
and to avoid style arguments. npm test
runs standard
automatically, so you don't have
to!
Install dependencies
npm install
Create a .env
file
PORT=<local port for the service>
TELEGRAM=<your telegram bot token>
Start
npm run dev
Digitalocean app
In the infrastructures
directory is avaliable a terraform
script for an
easy deployment on digitalocean app
. Environment variables required are
listen in infrastructures/main.tf
if you want to deploy on a different
service.
Systemd
First create a user and a group
sudo useradd -r -s /bin/bash -G midnabot midnabot
Copy the configuration file
sudo cp midnabot.service /etc/systemd/system/midnabot.service
Enable the service
sudo systemctl enable midnabot
Start the service
sudo systemctl start midnabot
Check logs
sudo journalctl -u midnabot