This messenger bot, communicate with an escpos-graphql-api. So you can sent message that are going to be printed directly to paper.
See it in action here : TODO LINK YOUTUBE VIDEO
To use the correct node version run:
nvm use
If you don't have nvm, install it first.
Instead of running npm install
use:
yarn install
If you don't have yarn, install it globally.
Configuration for the app is defined in .env
. The example is copied during installation and has the development environment defaults set.
On production server, environment variables are set manually on the server.
Variable | Description |
---|---|
ENV |
Environment (development, ci, test or production) |
PORT |
Http port to expose the webhook |
PRINTER_API_URL |
Url to your instance of the escpos-graphql-ap |
VERIFY_TOKEN |
Token used during registration process of the webhook on facebook apps |
Command | Description |
---|---|
yarn build |
Compiles the production version of the app into the dist folder. |
yarn start |
Run the prod server (from dist folder) |
yarn test |
Run all tests for the project once. |
yarn test:watch |
Start test runner and watch for changes. Only tests relevant to changed code will run. |
yarn lint |
Run eslint against all files. |
yarn lint:fix |
Attempt to automatically fix any formatting issues. (Runs eslint --fix and prettier). |
yarn localtunnel |
Usefull to test your bot locally without deploying it |
yarn start:dev |
Run development server with watch mode using nodemon |
If you would like to contribute, please check out CONTRIBUTING.md.
Deployment for my private use is done on Heroku automatically on master merge and is link to a private facebook bot. (My instance on Heroku is configured with all the env variables)
You can use this project for your needs and in that case deploy it wherever you want !