Chat Realtime

Javascript

Aplikasi private & public chatting secara realtime menggunakan firebase.

Pemakaian:

1. Import database db/chat_realtime.sql

2. Setting database php/config.php

<?php
// Replace with: your database account
$username     = "REPLACE";
$password     = "REPLACE";
$host         = "REPLACE";
$name         = "chat_realtime";

3. Setting Firebase & MySQL API js/config.js

// MySQL API
var apis = 'api.php';

// Replace with: your firebase account
var config = {
    apiKey: "REPLACE",
    databaseURL: "REPLACE.firebaseio.com"
};
firebase.initializeApp(config);

// create firebase child
var dbRef = firebase.database().ref(),
    messageRef = dbRef.child('message'),
    userRef = dbRef.child('user');

keyboard_arrow_up