Skip to content

messengerpeople/sample-bot-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample bot server

This project provides a sample server, acting as a chat bot.

Note

You'll need to create an account at app.messengerpeople.dev to create your first webhook and an OAuth application to obtain all required credentials.

Installation

Clone the repository:

git clone https://github.com/messengerpeople/sample-bot-server
cd sample-bot-server

Install the dependencies from npm:

npm install

Usage

To run the server, simply execute the index.js file:

node .

This should yield the following output:

msgppl $ node .
Bot listening for messages on localhost:3000

Configuration

The project contains a simple config.json file holding some settings you may play around with:

Setting Description
host The hostname to run the server on. localhost should suffice for testing.
port The port to listen on. Defaults to 3000.
verificationToken The webhook verification token.
secret The webhook secret for secured webhooks.
auth.clientId The OAuth client ID obtained from the dashboard.
auth.clientSecret The OAuth client secret obtained from the dashboard.

Releases

No releases published

Packages

No packages published