line_server_golang

This is a simple line server written in Golang.

Usage

  • save all messages sent by users
  • get all messages sent by users
  • broadcast

Getting Started

development environment

Golang Docker docker-compose

You should replace the url of webhook in line developer console with a url generated by ngrok http port.

Example: https://d685-61-65-116-30.jp.ngrok.io -> http://localhost:port

Running the System

git clone https://github.com/dalaoqi/line_server_golang.git

cd line_server_golang

# start
make

make help to see more.

Configuration

app:
  lineAccessToken: <your Channel access token>
  lineSecret: <your Channel secret>
  port: <listening port of server, default: 1234>
  
db:
  mongo:
    #name of database
    name: cinnox 
    url: mongodb://localhost:27017 
    
    lineEvent: 
      #name of collection
      name: lineEvent

Example

original size