Coder Social home page Coder Social logo

mig38m / distributed-nodejs-chat-with-redis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alster/distributed-nodejs-chat-with-redis

0.0 0.0 0.0 405 KB

Создано для

Home Page: https://habr.com/ru/post/440546/

Dockerfile 1.45% TypeScript 98.55%

distributed-nodejs-chat-with-redis's Introduction

Распределенный чат на Node.JS и Redis

Установка и запуск

Установка

npm i typescript ts-node -g
docker-compose -f "docker-compose.yml" up -d --build

Серверы доступны на портах 3001 и 3002, их логи можно посмотреть:

docker logs distributed-nodejs-chat-with-redis_sock-app-0_1 --tail 50 -f

..и:

docker logs distributed-nodejs-chat-with-redis_sock-app-1_1 --tail 50 -f

Чтобы поднять клиента заходим в папку sock-app и выполняем:

ts-node src/TestClient.ts %PORT%

Команды

Клиент являет собой интерактивную консоль с заданными командами

Description Call Full name
Авторизоваться a(user_name) Auth
Разлогиниться lo() Log Out
Обновить список подписок subs([user_to_unsubscribe], [user_to_subscribe]) Subscribtions
Узнать кто из списка пользователей онлайн o([user_name]) Online
Написать сообщение в комнату w(room, message) Write
Создать комнату cc(room) Create Chat
Добавить участника с комнаты am(room, member) Add Member
Удалить участника в комнату rm(room, member) Remove Member

Скринкасты

Чат с двумя участниками

asciicast

Онлайн статус

asciicast

Множество участников

asciicast

distributed-nodejs-chat-with-redis's People

Contributors

alster 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.