Giter Club home page Giter Club logo

websocket-chat's Introduction

Websocket based group chat app built with socket.io, react and material-ui à la The Walking Dead flavor

Check out the tutorial: Building a Node.js WebSocket Chat App with Socket.io and React

demo

Install.

npm install

Run the socket server.

npm run server

Run dev server, clients can be requested on localhost:3001.

npm run client

Demo

IMAGE ALT TEXT

websocket-chat's People

Contributors

justadudewhohacks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

websocket-chat's Issues

ERROR in ./node_modules/is-plain-object/index.js Module not found: Error: Can't resolve 'isobject' in 'C:\Users\Professional\projects\cyberia\theme\websocket-chat-master\node_modules\is-plain-object'

PS C:\Users\Professional\projects\cyberia\theme> cd .\websocket-chat-master
PS C:\Users\Professional\projects\cyberia\theme\websocket-chat-master> npm run client

[email protected] client C:\Users\Professional\projects\cyberia\theme\websocket-chat-master
webpack-dev-server

'webpack-dev-server' is not recognized as an internal or external command,
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] client: webpack-dev-server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] client script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Professional\AppData\Roaming\npm-cache_logs\2021-01-31T11_03_54_569Z-debug.log
PS C:\Users\Professional\projects\cyberia\theme\websocket-chat-master> npm run client

[email protected] client C:\Users\Professional\projects\cyberia\theme\websocket-chat-master
webpack-dev-server

Project is running at http://localhost:3001/
webpack output is served from /
Content not from webpack is served from C:\Users\Professional\projects\cyberia\theme\websocket-chat-master\public
404s will fallback to /index.html
Hash: e3b0cc7f9637994df2b7
Version: webpack 3.11.0
Time: 6482ms
Asset Size Chunks Chunk Names
bundle.js 2.51 MB 0 [emitted] [big] main
bundle.js.map 3 MB 0 [emitted] main
[0] ./node_modules/react/index.js 190 bytes {0} [built]
[14] ./node_modules/react-dom/index.js 1.36 kB {0} [built]
[38] (webpack)/hot/log.js 1.04 kB {0} [built]
[60] (webpack)/hot/emitter.js 77 bytes {0} [built]
[72] ./client/Root.jsx 9.12 kB {0} [built]
[97] (webpack)-dev-server/client?http://localhost:3001 7.93 kB {0} [built]
[98] (webpack)/hot/log-apply-result.js 1.31 kB {0} [built]
[183] multi (webpack)-dev-server/client?http://localhost:3001 webpack/hot/dev-server react-hot-loader/patch webpack-dev-server/client?http://localhost:3001 webpack/hot/only-dev-server ./client/index.jsx 88 bytes {0} [built]
[184] ./node_modules/url/url.js 23.3 kB {0} [built]
[190] ./node_modules/strip-ansi/index.js 161 bytes {0} [built]
[192] ./node_modules/loglevel/lib/loglevel.js 8.86 kB {0} [built]
[203] (webpack)/hot/dev-server.js 1.61 kB {0} [built]
[204] ./node_modules/react-hot-loader/patch.js 40 bytes {0} [built]
[313] (webpack)/hot/only-dev-server.js 2.37 kB {0} [built]
[314] ./client/index.jsx 732 bytes {0} [built]
+ 503 hidden modules

ERROR in ./node_modules/is-plain-object/index.js
Module not found: Error: Can't resolve 'isobject' in 'C:\Users\Professional\projects\cyberia\theme\websocket-chat-master\node_modules\is-plain-object'
@ ./node_modules/is-plain-object/index.js 10:15-34
@ ./node_modules/styled-components/dist/styled-components.browser.es.js
@ ./client/MainLayout.jsx
@ ./client/Root.jsx
@ ./client/index.jsx
@ multi (webpack)-dev-server/client?http://localhost:3001 webpack/hot/dev-server react-hot-loader/patch webpack-dev-server/client?http://localhost:3001 webpack/hot/only-dev-server ./client/index.jsx
webpack: Failed to compile.

Unexpected token ...

After cloning your project, successfully running' npm install', I get the following errors when I execute 'npm run server':
`

[email protected] server /var/www/html/srptApp/websocket-chat
node ./server/server.js
/var/www/html/srptApp/websocket-chat/server/handlers.js:37
const entry = { user, ...createEntry() }
---------------------^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/var/www/html/srptApp/websocket-chat/server/server.js:6:22)
npm ERR! Linux 3.10.0-862.3.2.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "server"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] server: node ./server/server.js
npm ERR! Exit status 1
npm ERR!
`

Please advise.

No left room message

Hi, just came across your medium article & code. Great job btw!!

Little thing really, when you select a user, join a room & then click on a the user profile icon (main image on the left). The event.message doesn't report this as the user has left the room. Whereas you can can rejoin the same room & it says:

Daryl joined Terminus
Daryl joined Terminus
Daryl joined Terminus
Daryl joined Terminus

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.