Skip to content

cyclex/ambpi-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMBPI Day Core Services

Table of Contents

  1. Features
  2. Installation
  3. Usage
  4. Configuration

Features

There is 2 command in this core services

  1. server supporting rest endpoint for CMS
  2. webhook supporting webhook for WABA
  3. cms provide content management system for campaign AMBPI

Installation

# Clone the repository
git clone https://github.com/cyclex/ambpi-core.git

# Navigate to the project directory
cd ambpi-core

# Install dependencies
make build

# Execute sql script
source schema/master.sql

Usage

# Run the application
# Server apps
./engine server -p :8081 -c config.json -d true

NAME:
   server server - start cms and chatbot service

USAGE:
   server server [command options] [arguments...]

OPTIONS:
   --port value, -p value    Listen to port
   --config value, -c value  Load configuration file
   --debug, -d               Debug mode (default: false)
   --help, -h                show help

# webhook apps
./engine webhook -p :8082 -c config.json -d true

NAME:
   server webhook - start webhook

USAGE:
   server webhook [command options] [arguments...]

OPTIONS:
   --port value, -p value    Listen to port
   --config value, -c value  Load configuration file
   --debug, -d               Debug mode (default: false)
   --help, -h                show help

Configuration

// config.json
{
  "log": {
    "maxsize": 10,
    "maxbackups": 10
  },
  "database": {
    "host": "localhost",
    "port": 5432,
    "user": "user",
    "password": "password",
    "name": "ambpi"
  },
  "chatbot": {
    "host": "https://869de8ac-2cac-44eb-ab04-fb7ff83cb000.mock.pstmn.io/bot/webhook",
    "host_push": "https://869de8ac-2cac-44eb-ab04-fb7ff83cb000.mock.pstmn.io",
    "phone_id":"6282122912548",
    "account_id": "xxx",
    "division_id": "xxx",
    "waba_account_number":"6282311333723",
    "access_token":"xxx",
    "access_token_push":"12345"
  },
  "queue":{
    "host" : "localhost",
    "port" : 27017,
    "name" : "ambpi",
    "expired" : 168 // hours in a week
  },
  "redis":{
    "address" : "localhost:6379",
    "password" : "",
    "db" : 0
  },
  "download_folder":"/Users/ansharharyadi/Desktop"
}

About

AMBPI webhook and rest services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published