chat21 / chat21-cloud-functions

Firebase cloud functions for Chat21. It's the server engine of Chat21 hosted on Google Firebase
http://www.chat21.org
GNU Affero General Public License v3.0
79 stars 65 forks source link
chat chat-application firebase firebase-functions livechat messaging sdk

Chat21 - Firebase Cloud Functions

npm version

Chat21 is the core of the open source live chat platform Tiledesk.com.

Introduction

Chat21-cloud function is the backend module required for the operation of the other chat21 modules.

Pre requisites

You can find more info about Firebase Functions here https://firebase.google.com/docs/functions/get-started

Project building

git clone git@github.com:chat21/chat21-cloud-functions.git
cd functions
npm install

Project setup

  1. Login on the Firebase CLI with firebase login - it requires access to a web browser.

    • To log into the CLI in remote environments that don't allow access to localhost, use the --no-localhost flag. firebase login --no-localhost More info here https://firebase.google.com/docs/cli/
  2. Set up your Firebase project by running firebase use --add, select your Project ID

Deploy

Deploy to Firebase using the following commands:

  1. Go in the project root directory with

    cd ..
  2. Deploy

    firebase deploy

You can now see the deployed functions on the Firebase Console under Functions menu.

Tips

Run with Docker

If you prefer you can use a pre-built docker image to deploy the cloud functions to the Firebase project:

Run:

docker run -it chat21/chat21-cloud-functions sh

After that follow the "Project setup" and "Deploy paragraphs.

Test

Send your first message

Advanced Setup Options

Read the Setup Options page

REST API

Read the REST API page