Giter Site home page Giter Site logo

chatter's Introduction

Chatter

A chat application written in Node.JS with rooms management, authentication, and log persistence.

It's an express.js application that uses mongoose as ORM, passport for managing the authentication and redis as a session store.

Server/Client messaging communication is handled by socket.io, which shares the session with express.js to verify users authentication.

How to use

Requirements

  • redis (for session management)
  • mongodb
  • node.js
  • coffee-script: Remember to install it with npm install -g coffee-script. This way you'll have the executable in your path
  • jake: Remember to install it with npm install -g jake. This way you'll have the executable in your path

Install

Clone it and install the needed packages:

git clone [email protected]:nicolaracco/chatter.git
cd chatter
npm install

Configure

The default configuration is in config/config.json. In config/environments there is one config file for each environment (each of these takes precedence upon the default configuration).

If you need to change the configuration and you don't want git to track your changes, you can overwrite each file creating a .local.json file: config/config.local.json to overwrite the default configuration, config/environments/config.test.local.json to overwrite the test configuration, and so on.

E.g.

# config/environments/config.production.local.json

{
  "server": {
    "port": 80 # server port
  },
  "session": {
    "secret": "sdkjbcsjdbc23h23exn832e2,jsbdcjsbcjsb" # session secret
  },
  "db": {
    "uri": "mongodb://localhost:27017/chatter" # mongodb uri
  },
  "assets": {
    "compile": true # concatenate and minify assets
  }
}

Create a user

Use Jake script to manage your users:

jake users:list     # List all users
jake users:create   # Create a new user. E.g. jake users:create[[email protected],password]
jake users:remove   # Removes a user. E.g. jake users:remove[[email protected]]

Ready!

Now you can start the server with: coffee app.coffee.

Specs

Install buster globally with npm install -g buster and run specs with buster-test.

At the moment you have to run each spec individually (e.g. buster-test "Room Model").

TODO

  • Transcript
  • Admin panel for user management
  • Room deletion
  • Private messages

chatter's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

spaghetticode

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.