Skip to content

Latest commit

 

History

History
48 lines (24 loc) · 856 Bytes

readme.md

File metadata and controls

48 lines (24 loc) · 856 Bytes

remonlineOrderCreator

Create new client and order in remOnline with telegram bot

Getting Started:

  1. Clone repo, install dependencies

git clone <git-repo-url> && cd <remonlineBot> && npm i

  1. Set up local environment variables

cp .env.example .env

  1. create db

node node_modules/db-migrate/bin/db-migrate db:create main

add main branch with

insert into branches(id,name,public_name,manager_id) values("112954","name","public name","employee id")

  1. run migrations

node node_modules/db-migrate/bin/db-migrate up

  1. Install PM2

sudo npm install pm2@latest -g

  1. Start process with PM2

pm2 start ecosystem.config.js

  1. Save process to start with PM2

pm2 save

  1. Make PM2 starts on boot

pm2 startup

Session details:

ctx.session.saved - wrote at least once

ctx.session.remonline_id - found or create remonline client