Realtime Chat w/ Laravel + Redis + Node.js + Socket.io
PHP JavaScript HTML Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bootstrap
nodejs node_modules folder removed May 6, 2015
public
.gitattributes
.gitignore .gitignore updated May 6, 2015
.travis.yml
CONTRIBUTING.md
README.md
artisan Initial Commit Nov 19, 2014
composer.json
dump.rdb Small fixes Mar 14, 2015
npm-debug.log
phpunit.xml
realtime.sh Realtime.sh added Nov 25, 2014
server.php

README.md

Laravel Realtime Chat

Build Status Code Climate

A realtime chat sample written in Laravel 4.2 + Redis + Node.js + Socket.io.

Um exemplo de chat realtime escrito em Laravel 4.2 + Redis Node.js + Socket.io (instruções somente em inglês).

Live example available at: http://chat.guilhermeslk.com.br :)

##Requirements Laravel 4.2 MySQL Redis Node.js NPM

##How to install

Step 1: Clone this repo

$ git clone https://github.com/guilhermeslk/laravel-realtime-chat.git

Step 2: Install composer packages

$ cd laravel-realtime-chat
$ composer install

Step 3: Configure Database

Edit your database.php to match your local database settings.

    ...
	'connections' => array(

		'mysql' => array(
			'driver'    => 'mysql',
			'host'      => '<HOST>',
			'database'  => '<DATABASE>',
			'username'  => '<USERNAME>',
			'password'  => '<PASSWORD>',
			'charset'   => 'utf8',
			'collation' => 'utf8_unicode_ci',
			'prefix'    => '',
		),
    ...

Step 4: Migrate & Populate Database

Run these commands to create and populate your database:

$ php artisan migrate
$ php artisan db:seed

Step 5: Install NPM dependencies

CD into the nodejs folder and run npm install in order to have the all dependencies installed.

$ cd nodejs
$ npm install

Step 6: Run PHP's built-in development server

$ cd ..
$ php artisan serve

Step 7: Start Redis Server

$ redis-server

Step 8: Start the "Realtime" server (nodejs/server.js)

$ ./realtime.sh

That's it! Now you should be ready to go!