{"id":19326194,"url":"https://github.com/marlinsk/demo-chat-app-nodejs-express-socketio","last_synced_at":"2026-04-04T08:37:53.205Z","repository":{"id":206123268,"uuid":"714736394","full_name":"Marlinsk/demo-chat-app-nodejs-express-socketio","owner":"Marlinsk","description":"A simple chat application in nodejs and mongodb","archived":false,"fork":false,"pushed_at":"2023-11-18T18:02:32.000Z","size":159,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-06T06:44:00.782Z","etag":null,"topics":["bootstrap","docker","expressjs","html","javascript","mongodb","mongoose","nodejs","socket-io","static-site"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Marlinsk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-05T18:06:42.000Z","updated_at":"2023-11-12T04:51:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"af37deb6-82c3-429d-a166-42a059d43062","html_url":"https://github.com/Marlinsk/demo-chat-app-nodejs-express-socketio","commit_stats":null,"previous_names":["marlinsk/demo-chat-app-nodejs-express-socketio"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marlinsk%2Fdemo-chat-app-nodejs-express-socketio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marlinsk%2Fdemo-chat-app-nodejs-express-socketio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marlinsk%2Fdemo-chat-app-nodejs-express-socketio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marlinsk%2Fdemo-chat-app-nodejs-express-socketio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marlinsk","download_url":"https://codeload.github.com/Marlinsk/demo-chat-app-nodejs-express-socketio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240427314,"owners_count":19799471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","docker","expressjs","html","javascript","mongodb","mongoose","nodejs","socket-io","static-site"],"created_at":"2024-11-10T02:12:45.438Z","updated_at":"2025-12-30T19:20:52.528Z","avatar_url":"https://github.com/Marlinsk.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo chat app with Node.js Express and Socket.io\nA simple chat application in nodejs and mongodb\n\nRead: https://medium.com/@amkurian/simple-chat-application-in-node-js-using-express-mongoose-and-socket-io-ee62d94f5804\n\n## The objective of this project\nThis project, titled \"demo-chat-app,\" is a real-time chat application designed to facilitate seamless communication and messaging between users. Leveraging the power of **Node.js, Express.js, and Socket.io,** this application offers a dynamic and interactive platform for users to exchange messages in real-time.\n\n### Key Features:\n\n**Real-Time Messaging:** The heart of this application is the real-time messaging feature, enabling users to send and receive messages instantly. With Socket.io, messages are delivered as soon as they are sent, creating a responsive and interactive chat environment.\n\n**User Authentication:** While not explicitly mentioned in the package.json, user authentication and security are paramount in ensuring that messages are exchanged securely. Users can log in and identify themselves, adding a layer of privacy and accountability.\n\n**Message Storage:** The application is backed by a MongoDB database (as indicated in the package.json) to store messages. This allows users to access past conversations and ensures that messages are not lost even if users are offline.\n\nThe \"demo-chat-app\" serves as a practical demonstration of real-time communication and showcases how modern technologies can be harnessed to create a responsive and engaging messaging platform. Whether for personal, business, or collaborative purposes, this chat application provides a versatile solution for real-time communication needs.\n\nWith a user-friendly interface and the ability to handle a range of users and messages, this project demonstrates the potential of Node.js, Express.js, and Socket.io for building dynamic and interactive chat applications. Users can enjoy the convenience of real-time messaging while keeping their conversations securely stored and easily accessible.\n\nThis chat application reflects the ongoing evolution of web technologies and their role in enhancing communication and connectivity among individuals and businesses alike.\n\n## Technologies\n\n- Node.js: A JavaScript runtime environment that allows server-side applications to be built using JavaScript.\n\n- Express.js: A web application framework for Node.js that simplifies the development of web and mobile applications.\n\n- Socket.io: A library for enabling real-time, bidirectional communication between clients and the server, commonly used for building interactive, real-time web applications.\n\n- MongoDB: A NoSQL database used to store and manage data. In your project, it appears to be used for message storage.\n\n- Mongoose: An Object Data Modeling (ODM) library for MongoDB and Node.js, which simplifies interactions with MongoDB databases.\n\n## Tutorial\n**Note:** To follow the step-by-step instructions for running the application on your machine, you need to have knowledge of terminal commands, Git and GitHub commands, and npm package manager commands, as well as navigating between folders using the terminal.\n\n### Cloning and setting up the project\n**1º step: clone the repository to your machine from GitHub.**\n```bash\ngit clone https://github.com/Marlinsk/demo-chat-app-nodejs-express-socketio.git\n```\n\n**2º step: Navigate to the project folder.**\n```bash\ncd demo-chat-app-nodejs-express-socketio\n```\n\n**3º step: Create .env file before run npm install in the terminal**\n```bash\nDATABASE_URL='mongodb+srv://USERNAME:PASSWORD@HOST/DATABASE'\nSERVER_URL='http://localhost:3000'\n```\n**Note:** In the env.example file, there is an example of a connection URL to MongoDB Atlas.\n\n**4º step: Run the command in the terminal to install the project dependencies.**\n```bash\nnpm install\n```\n\n**5º step: Run the command in the terminal to start the application, and feel free to test and play around.**\n```bash\nnpm run start\n```\nNow, you just need to access it using a request tool or consume it; the application is running on **localhost:3000.**\n\n## Creating a Docker image of the application\n**Note**: You need to have Docker on your machine and have a basic understanding of terminal commands. Having all of that, let's get started.\n\n**1º step: Inside the project folder, run the following command in the terminal to create the Docker image.**\n```bash\ndocker build -t simple-chat-app:1.0.0 .\n```\n\n**2º step: Execute the following command in the terminal to have Docker run the 'simple-chat-app:1.0.0' image while mapping port 3000 from the host to port 3000 within the container.**\n```bash\ndocker run -p 3000:3000 --name my-chat-app simple-chat-app:1.0.0\n```\nNow, you just need to access it using a request tool or consume it; the application is running on **localhost:3000.**\n\n### Other docker commands\nCommand to list the docker images\n```bash\ndocker images\n```\n\nCommand to list the running containers\n```bash\ndocker ps\n```\n\nTo stop a specific container\n```bash\ndocker stop \n```\n**Note:** To stop all running containers, you can simply use **docker stop.**\n\nTo remove specific container\n```bash\ndocker rm my-chat-app\n```\n\nTo remove specific image\n```bash\ndocker rmi simple-chat-app:1.0.0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarlinsk%2Fdemo-chat-app-nodejs-express-socketio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarlinsk%2Fdemo-chat-app-nodejs-express-socketio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarlinsk%2Fdemo-chat-app-nodejs-express-socketio/lists"}