├── .gitignore ├── README.md ├── build ├── asset-manifest.json ├── favicon.ico ├── index.html ├── manifest.json ├── precache-manifest.80ef1b6acb37cb929832cde8ee51c719.js ├── service-worker.js └── static │ ├── css │ ├── 2.1f92ef3f.chunk.css │ ├── 2.1f92ef3f.chunk.css.map │ ├── main.05b4cfd1.chunk.css │ └── main.05b4cfd1.chunk.css.map │ └── js │ ├── 2.a8f4c8e1.chunk.js │ ├── 2.a8f4c8e1.chunk.js.map │ ├── main.956bee51.chunk.js │ ├── main.956bee51.chunk.js.map │ ├── runtime~main.a8a9905a.js │ └── runtime~main.a8a9905a.js.map ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── index.html └── manifest.json ├── server ├── index.js ├── methods.js └── socketManage.js └── src ├── App.css ├── App.js ├── App.test.js ├── components ├── ChatsPage │ ├── ChatPage.js │ ├── MessageHeader.js │ ├── MessageInput.js │ ├── MessagesBody.js │ └── Sidebar.js ├── LoginPage │ └── LoginPage.js └── Main.js ├── events.js ├── index.css ├── index.js ├── logo.svg └── serviceWorker.js /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | # /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chat application with React and socket.io 2 | 3 | This app was basic chat application dose not incluse database, it was fucus on React and socket.io 4 | 5 | ## Get install 6 | 7 | ```bash 8 | git clone https://github.com/tudtude/Chat-React-SocketIO.git 9 | cd Chat-React-SocketIO 10 | npm install 11 | ``` 12 | 13 | ## Dev mode 14 | Befor run this on your machine you need to change some code, due with this code was apply to https://chat-react-socket.herokuapp.com/, that was online system/ production mode. There are two file need to be correct as below 15 | 16 | 1) src/components/Main.js ---> line 10 17 | 2) server/index.js ---> line 12 18 | 19 | After change need to run speparate command 20 | 1) Start backend with 21 | 22 | ```bash 23 | npm run server 24 | ``` 25 | 26 | 2) Start react view 27 | ```bash 28 | npm run react 29 | ``` 30 | 31 | ### Online Demo 32 | https://chat-react-socket.herokuapp.com/ 33 | 34 | **Thank https://www.heroku.com/home ** 35 | 36 | -------------------------------------------------------------------------------- /build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "main.css": "/static/css/main.05b4cfd1.chunk.css", 3 | "main.js": "/static/js/main.956bee51.chunk.js", 4 | "main.js.map": "/static/js/main.956bee51.chunk.js.map", 5 | "runtime~main.js": "/static/js/runtime~main.a8a9905a.js", 6 | "runtime~main.js.map": "/static/js/runtime~main.a8a9905a.js.map", 7 | "static/css/2.1f92ef3f.chunk.css": "/static/css/2.1f92ef3f.chunk.css", 8 | "static/js/2.a8f4c8e1.chunk.js": "/static/js/2.a8f4c8e1.chunk.js", 9 | "static/js/2.a8f4c8e1.chunk.js.map": "/static/js/2.a8f4c8e1.chunk.js.map", 10 | "index.html": "/index.html", 11 | "precache-manifest.80ef1b6acb37cb929832cde8ee51c719.js": "/precache-manifest.80ef1b6acb37cb929832cde8ee51c719.js", 12 | "service-worker.js": "/service-worker.js", 13 | "static/css/2.1f92ef3f.chunk.css.map": "/static/css/2.1f92ef3f.chunk.css.map", 14 | "static/css/main.05b4cfd1.chunk.css.map": "/static/css/main.05b4cfd1.chunk.css.map" 15 | } -------------------------------------------------------------------------------- /build/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudtude/Chat-React-SocketIO/ede4fe9ce91bf692029ba4da9a2e2d803d042738/build/favicon.ico -------------------------------------------------------------------------------- /build/index.html: -------------------------------------------------------------------------------- 1 |