my-line-simple-bot

A LINE bot server utilized with liff-react-boilerplate and imgur-api-go-v3, User can chat with bot, upload image to imgur or search subreddit/account on imgur.com.

Also a barebones Go app, which can easily be deployed to Heroku.

This application supports the Getting Started with Go on Heroku article - check it out.

Running Locally

Make sure you have Go version 1.12 or newer and the Heroku Toolbelt installed.

$ git clone https://github.com/heroku/my-line-simple-bot.git
$ cd my-line-simple-bot
$ go build -o bin/my-line-simple-bot -v .
github.com/mattn/go-colorable
gopkg.in/bluesuncorp/validator.v5
golang.org/x/net/context
github.com/heroku/x/hmetrics
github.com/gin-gonic/gin/render
github.com/manucorporat/sse
github.com/heroku/x/hmetrics/onload
github.com/gin-gonic/gin/binding
github.com/gin-gonic/gin
github.com/heroku/my-line-simple-bot
$ heroku local

Your app should now be running on localhost:8888.

Note. server read and access variable like PORT from .env, usually put that in the project root.

For example:

LINEBOT_CHANNEL_SECRET=1234
LINEBOT_CHANNEL_TOKEN=5678
IMGUR_CLIENT_ID=1234
IMGUR_CLIENT_SECRET=5678
PORT=8888

Deploying to Heroku

$ heroku create
$ git push heroku master
$ heroku open

or

Deploy

Demo

Add the LINE bot as a friend:

Press the button 加入好友 or scan the QRcode:

reactToPost

Documentation

For more information about using Go on Heroku, see these Dev Center articles: