mozixreality/DS-LineServer

★ 0Forks 0JavaScriptGitHub ↗Compare

README

database config

Install postgresql (see https://www.enterprisedb.com/downloads/postgres-postgresql-downloads)

Change postgresql user to root and password to password, or rewrite settings in dbconfig.js as wishes

Launch your pgAdmin, a management tool for PostgresDB.

CREATE TABLE by Line_Info.sql and Import Data(Line_Info.csv)to create user server database.

get started

npm install to install node modules node app.js to run server on localhost:8001

API

get /line_info

Return all line_info

put /line_info

To update line_info

valid: 200

invalid: 400

example put body

{"nick_name": "mozix","channel_id": "656452143","channel_secret": "05425dffa740b7c5d81f89fc5993e074"} this token is only for example, this will not work

Kafka Consumer

node kafka/consumer.js

to start kafka consumer and fetch topic on LineMsg, then send msg to certain Line bot.

Contributors

mozixrealityjieyu891225

Issues