bot demo @GetShortUrlBot
/start
Start bot
- Nodejs and npm installed.
- Have a Heroku account.
- Git installed.
- Create a bot from Telegram, sending this message to @BotFather | Reference
/newbot
- Clone this repo
git clone https://github.com/jabjabrik/url-shortener-bot.git
cd url-shortener-bot
npm install
- Put the token received into a file called
.env
BOT_TOKEN = YOUR_BOT_TOKEN
- Run locally
npm start
- Install Heroku CLI
npm install -g heroku
- Login to heroku
heroku login
- Create a new project
heroku create {ProjectName}
- Put your project name in the
.env
file.
HEROKU_URL = https://{ProjectName}.herokuapp.com
Commit your code
and deploy to heroku server
npm run deploy
- View logs
heroku logs