Skip to content
Snippets Groups Projects
user avatar
Mihai-Valentin DUMITRU authored
This way, we won't store each welcoming message in the database, but
updating the contstant message ID once the mesage changes allows us to
still know exactly what the user was shown.
7145c832
History

The js script can be introduced on any website and it will inject a chat bubble. The backend repo can be found at https://gitlab.cs.pub.ro/netsys/js_chat_widget

Run test:

For testing locally, you can serve this with python:

$ python3 -m http.server

(by default, this is port 8000)

And change the URL of the backend (and of the feedback and report endpoints):

In js/api.js, change:

- const BACKEND_URL = 'https://chat.upb.ro/api/chat/';
+ const BACKEND_URL = 'http://localhost:8888/api/chat/';

In js/report.js, change:

- const REPORT_URL = 'https://chat.upb.ro/api/report/';
+ const REPORT_URL = 'http://localhost:8888/api/report/';

In js/feedback.js, change:

- const FEEDBACK_URL = 'https://chat.upb.ro/api/feedback/';
+ const FEEDBACK_URL = 'http://localhost:8888/api/feedback/';