Giter Club home page Giter Club logo

ajax-long-polling-chat's Introduction

Long Polling Ajax Chat

What's it

This is a very simple long polling chat demonstration. I made it just for fun , but maybe it can help someone in any place of the world :3


How works

This chat works keeping a single connection open between client and server , this connection will be the responsible to detect any replies from server , and when it occurs, the connection is closed, and a new HTTP request is opened to keep watching the server again.

This app runs over a very simple framework , or a kind of , that i've developed for this app. (It just do basic URL matches, controllers logic and views rendering) No jQuery dependency for XHR requests and DOM updates.


Setup

1 - First of all, of course , clone this repository 2 - Create the file app/config/db/db-config-development.php(just rename the db-config-sample file and edit database access configurations) 3 - Access the app using your local apache installation, you will be prompted to setup things. 4 - Now setup the main database, and next go to /setup to finish the tables migration. 5 - Play it harder, make it better, do it faster, make us stronger :)


Screenshots

Simple chat


TODO

  • Better documentation
  • User's authentication(i'm not planning this, but who knows)
  • Basic framework's docs(just go ahead and study this if you're curious, it's very very simple)
  • Improve mysql perfomance
  • Tests

License

The project is licensed under the MIT license. See LICENSE file for details.


How to Contribute

Pull Requests

1 Fork this repository 2. Create a new branch for each feature or improvement 3. Send a pull request from each feature branch to the develop branch

ajax-long-polling-chat's People

Contributors

fidelisrafael avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ajax-long-polling-chat's Issues

unable to connect

Fatal error: Class 'Chat\Database' not found in D:\xampp\htdocs\ajax-long-polling-chat-master\lib\message.php on line 28

Can't run

I was clone it to my wamp sever's www fold

and rename the db-config-sample to db-config-development.php

and i'm sure i creat database and table

but when i link to index.php

it got many php error

and ahow"
Please, create the database DB_NAME for application.

You can import the file MIGRATIONS_FOLDER/createSimple_chat.sql using phpMyAdmin/mysqldump or run :

mysql -u [YOU USERNAME] -p[YOUR PASSWORD] < MIGRATIONS_FOLDER/createSimple_chat.sql
Now finish, and create database tables
"

(but i just do that before!!(creat db and table ,check db-config)

could u give me some help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.