GithubHelp home page GithubHelp logo

socket.io-webpack2-chat's Introduction

Socket.IO Chat Application using webpack 2

This application follows the Socket.IO tutorial (http://socket.io/get-started/chat/) to build the example chat application. It's just a fun way to begin learning about Socket.IO and webpack 2.

There's a step in the tutorial where it asks you to write JavaScript in the html file - this is where this project deviates slightly.

Instead of inline JavaScript, the project uses webpack 2 to bundle the client-side Socket.IO code and jQuery for use in the html file. Neat!

Getting Started

Prerequisites

Running the project

Install the project's dependencies:

npm install

Use webpack to build the bundle.js file:

./node_modules/.bin/webpack public/javascripts/socket.js public/javascripts/bundle.js

Start the server:

node index.js

Open two (or more) browser windows on port 3000.

Type a message and see that the message is displayed real-time in both windows.

Ta-da!

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.