PrashanthKumar0 / meteor-chat-app

a web chat app based on server sent events

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

meteor-chat-app

a web chat app based on server sent events see a live version ?

Deploying

Deploy

#edit services/config.php accordingly while deployiing espically these lines
define('DB_HOST','localhost');
define('DB_PORT',5432);
define('DB_NAME','TestDb');
define('DB_USER','root');
define('DB_PASSWD','');
define('DB_CHAT_TABLE','chats');
define('DB_DSN','pgsql:dbname='.DB_NAME.';host='.DB_HOST.';port='.DB_PORT);

services/config.php also contains the chat table's schema in postgreSQL .

#Make sure to tweak these lines in services/database_handler.php if you are not using heroku 

$db = parse_url(getenv("DATABASE_URL"));
$this->db = new PDO("pgsql:" . sprintf(
            "host=%s;port=%s;user=%s;password=%s;dbname=%s",
        $db["host"],
        $db["port"],
        $db["user"],
        $db["pass"],
        ltrim($db["path"], "/")
));
#make sure to change these line too in services/broadcaster/index.php inorder to cope up with cpu usage

usleep(10); 

#this line enables a short rest from broadcasting so that cpu isnt overwhelmed

About

a web chat app based on server sent events


Languages

Language:CSS 83.8%Language:PHP 10.1%Language:JavaScript 3.5%Language:HTML 2.7%