Git Product home page Git Product logo

node_chat's Introduction

Build Status

node_chat

A self contained chat server running on node, based on WebSocket. This server currently has many bugs and security holes. It's currently aimed as an experiment on WebSockets and node.js capability to handle socket connections. The code is also currently poorly commented.

How to run

In order to run this server, you will need node.js installed in your system. After installing node.js (make sure you have npm installed) you have run,

npm install

Then you can simply write in command line while inside the node_chat directory.

node chatServer.js

To make a docker image named node_chat

./make.sh

Then,

docker run -p 7777:7777 -d node_chat

There is a pre-slashed BASE_URI environment variable option.

Start chatting! Simply give the URL as to your friends and they can join in. The URL should be in this format, http://your_ip_address:7777. In your browser you can put http://localhost:7777 to connect to the chat.

How to change the default port

By default if you will run on port 7777. You can change is by simply chaging number in chatServer.js (line 47). The line looks like this,

server.listen(7777, function() {

Thanks to

http://martinsikora.com/nodejs-and-websocket-simple-chat-tutorial The server code is based on this tutorial...

node_chat's People

Contributors

arijitdasgupta avatar

Watchers

James Cloos avatar  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.