Skip to content

adj87/node-chat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.JS Chat

GitHub Stars GitHub Issues Current Version Live Demo " Gitter

This is a node.js chat application powered by SockJS and Express that provides the main functions you'd expect from a chat, such as emojis, private messages, an admin system, etc.

Chat Preview

Demo

You can test a fully working live demo at https://igorantun.com/chat

  • Type /help to get a list of the available chat commands

Features

Setup

Clone this repo to your desktop and run npm install to install all the dependencies.

You might want to look into app.js and public/js/chat.js to make some adjustments such as changing the socket url to other than localhost, and set up a SSL certificate to work with it.

Config

Along with version 0.21.0 and up, additional config files are required.

These allow for furthered environment settings, controlled from within /lib/config/index.js

The config module loads files from within /config/*, these are detailed below:

config/mysql.json
{
  "username":"",
  "password":"",
  "database":"",
  "host":""
}

The credentials to connect to your mysql database.

config/express.json
  "key1":"",
  "key2":""
}```

These are the keys that encrypt the user cookie session, they should be completely random, and not shared.

##### config/twitter.json
```{
  "TWITTER_CONSUMER_KEY":"",
  "TWITTER_CONSUMER_SECRET":""
}```

##### config/salt.json
```{
  "salt":"random_string"
}```

Salt to encrypt the json web token.


The keys in order to be able to use the Twitter oauth2 API.
You can get new keys here: https://apps.twitter.com/

## Usage
After you clone this repo to your desktop, go to its root directory and run `npm install` to install its dependencies.

Once the dependencies are installed, you can run  `node main.js` to start the application. You will then be able to access it at http://localhost:3000

To give yourself administrator permissions on the chat, you will have to type `/op [your-name]` in the app console.

About

Node.JS Chat Application

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 73.8%
  • HTML 21.4%
  • CSS 4.8%