Chat with Opla's Bots in your web page
First of all, make sure you have Node 8.x and Yarn, and PHP installed.
This project requires a backend application to start. At the moment, you have to
install this backend application by yourself.
In the following, we assume this backend application runs locally and is
available at: 127.0.0.1:8081
.
-
Install the (dev) dependencies:
$ yarn install
-
Create an application in the backend to get client_id / client_secret:
$ curl -X POST \ http://127.0.0.1:8081/auth/application \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -d '{"name":"Opla Webchat","grant_type":"password","redirect_uri":"localhost","email":"[email protected]"}'
-
Rename server/config-sample.php to server/config.php and edit it by adding client_id and client_secret:
define('CLIENT_ID', 'client_id_here'); define('CLIENT_SECRET', 'client_secret_here');
-
Start the dev environment:
$ yarn dev
This application should be available at: http://127.0.0.1:8085/. You need to use front to start a webchat, and put this url in front config's botsUrl
Please, see the CONTRIBUTING file.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See CODE_OF_CONDUCT file.
opla-webchat is released under the MIT License. See the bundled LICENSE file for details.