This bootstrap project has been created to quick start your botocrat development. utils
, middlewares
and commands
are examples that you can remove if you don't need.
npm i
Obtain a bot token via BotFather
Create environment variable BOT_TOKEN
before start.
export BOT_TOKEN=012122123:sDKJNkjsdnajkljndkASJKDNLk
Bot token is secret and you should never store in a codebase, also you shouldn't share and paste anywhere, especially in Telegram Bot Talk group :)
npm start
Go to your bot and send /start
command.
Start development by editing bot/index.js and have fun!
Edit config/app.js
for production parameters.
node run/production
You can test webhooks via ngrok to be sure that works.
After uploading to cloud;
npm run prod
npm run stop