JamesHsu333 / Line-preaccessment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preassessment for LINE

GoDoc goreportcard.com

Assignment for Line, which promote myself through chatbot.

How to operate

QR Code

  1. Scan this QR code or search @458pivlz to add LINE Friend .

  2. Follow the instruction of dialog or richmenu.

  3. Input any string to test the different reaction.

Structure

process

How to develop

First, you can install the project by cloning the repo:

git clone https://github.com/JamesHsu333/Line-preaccessment.git

Then, create .env and complete it with the CHANNEL_TOKEN and CHANNEL_SECRET from LINE Developers console:

CHANNEL_SECRET=YOUR CHANNEL SECRET
CHANNEL_TOKEN=YOUR CHANNEL TOKEN
PORT=PORT YOU PREFER

Thus, install the dependencies and start the app:

go install .
go run server.go message.go constant.go

Use ngrok or proxy to redirect localhost with https, then update the Webhook URL from LINE Developers console with:

https://(YOUR IP ADDRESS FROM ngrok OR proxy)/callback

How to deploy

Deploy

CI/CD with GitHub/GitLab

CICD

You can use GitHub or GitLab as your git repo

Heroku can automatically build and release (if the build is successful) pushes to your GitHub repo

For more details, please read the instruction of Heroku

About

License:Apache License 2.0


Languages

Language:Go 100.0%