/rethink-node-chat-server

A RethinkDB chat server built on hapi.js (A NodeJS framework). The idea is to demonstrate how to to build a real time chat server with RethinkDB, hapi.js and socket.io .

Primary LanguageJavaScriptMIT LicenseMIT

📝 Author

Arman Bhuiyan Github / LinkedIn / Facebook / Site / E-Mail

Rethink Node Chat Server.

A RethinkDB chat server with NodeJS Hapi framework.

The idea is to demonstrate how to to build a real time chat server with RethinkDB, HapiJS(NodeJS) and socket.io .

Complete stack

HOW TO RUN

  1. Create a rethinkDB database named 'rethinkchat' (If you don't have RethinkDB installed, you can follow these instructions to get it up and running.)
  2. Clone the project from git.
  3. Go to 'rethink-node-chat-server' directory ( cd rethink-node-chat-server ).
  4. Run yarn or npm install .
  5. If you have different database configurations then you can change the index.js file under ./src/config directory and config.js file under ./rethinkdb-config directory.
  6. Run npm run initapp to populate database with dummy data (windows users should replace initapp script with SET NODE_ENV=development & node scripts/init-dev.js in package.json file).
  7. Run npm start to start the server.

API server will start at 'http://localhost:3030' and chat server(socket) will start at 'http://localhost:5000' but you will have to configure the chat client app at 'https://github.com/arman37/rethink-node-chat-client' to see how the API & Socket work.

Npm Command Previews

Screenshot1 Screenshot2

Contributing

If you like the project, shoot a 🌟 and feel free to fork & send PR anytime.

License

MIT licensed