Giter VIP home page Giter VIP logo

sailschat's Introduction

sailsChat

A Sails application

What it is

sailsChat is a multi-user chat app that demonstrates some new features in Sails v0.10:

  • Low-level socket methods using sails.sockets
  • New / reworked PubSub methods
  • Auto-generated routes and actions (blueprints) for associations

The app features both private messages between two users, and public (multi-user) chatrooms, all updated in real time. And all in under 100 lines of backend code (using the strictest method of line-counting :) )

What it ain't

sailsChat is not a sterling example of how to architect a web application. The front-end is deliberately simplified, using no outside libraries besides jQuery and socket.io. The back-end is similarly oversimplified--a new user is created whenever a socket connects to the server, and destroyed as soon as that socket disconnects. This allows us to easily demonstrate concepts without having to implement a login system, sessions, or anything else extraneous.

Installing

Clone the repo into a new directory, npm install and sails lift, and you're off!

Using

Browse to http://localhost:1337 to view the app in all its glory. A new user will be created for you automatically. Of course, a chat app isn't much fun with just one user, so open another tab or browser window to the same address to pop up a new user. Then use the "Send private message" button to communicate directly between two users, or start a new chat room to chat with a group!

More

On the wiki.

sailschat's People

Contributors

sgress454 avatar

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.