dadansatria / yii2-realtime-chat-example

Yii2 simple realtime chat with websocket.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DIRECTORY STRUCTURE

  assets/             contains assets definition
  commands/           contains console commands (controllers)
  config/             contains application configurations
  controllers/        contains Web controller classes
  mail/               contains view files for e-mails
  models/             contains model classes
  nodejs/             server.js -> get data from server without sending request from client
  runtime/            contains files generated during runtime
  tests/              contains various tests for the basic application
  vendor/             contains dependent 3rd-party packages
  views/              contains view files for the Web application
  web/                contains the entry script and Web resources

Getting Started

  1. run composer install to install the framework and its components
  2. run npm install to install the node modules
  3. edit database config at config/db.php

Database

Apply the database migration to create the table required to store the chatting messages

php yii migrate/up

Running Node Service

node server.js

Preview

Alt Text

About

Yii2 simple realtime chat with websocket.io

License:Other


Languages

Language:PHP 96.7%Language:CSS 1.4%Language:JavaScript 1.1%Language:Batchfile 0.8%