https://github.com/mediacomem/one-chat-room
Real-time Node.js/Vue/Socket.io demo application
https://github.com/mediacomem/one-chat-room
chat chatroom node nodejs real-time realtime socket-io socketio vue vuejs
Last synced: about 1 year ago
JSON representation
Real-time Node.js/Vue/Socket.io demo application
- Host: GitHub
- URL: https://github.com/mediacomem/one-chat-room
- Owner: MediaComem
- License: mit
- Created: 2019-01-10T14:28:43.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-09-27T23:03:31.000Z (over 1 year ago)
- Last Synced: 2025-03-20T16:52:28.239Z (about 1 year ago)
- Topics: chat, chatroom, node, nodejs, real-time, realtime, socket-io, socketio, vue, vuejs
- Language: JavaScript
- Homepage: https://one-chat-room.archidep.ch
- Size: 584 KB
- Stars: 4
- Watchers: 4
- Forks: 25
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# One Chat Room
A real-time demo application written with [Node.js](https://nodejs.org/en/), [Vue](https://vuejs.org/) and [Socket.io](https://socket.io/):
one chat room where anyone can post messages.
[](https://github.com/MediaComem/one-chat-room/actions/workflows/build.yml)
[](https://github.com/MediaComem/one-chat-room/actions/workflows/publish.yml)
[](https://opensource.org/licenses/MIT)
- [Installation](#installation)
- [Requirements](#requirements)
- [Setup](#setup)
- [Run in development mode](#run-in-development-mode)
- [Run in production mode](#run-in-production-mode)
- [Configuration](#configuration)
## Installation
### Requirements
- [Node.js](https://nodejs.org) 22+
- [Installation](https://nodejs.org/en/download/package-manager/)
- [MongoDB](https://www.mongodb.com) 8+
- [Installation](https://docs.mongodb.com/manual/administration/install-community/)
### Setup
- Clone the repository
- Install dependencies
```
cd /path/to/repo
npm install
```
- Set up environment variables for [configuration](#configuration) if needed.
### Run in development mode
```
cd /path/to/application
npm run dev
```
### Run in production mode
```
cd /path/to/application
npm start
```
## Configuration
The following environment variables can be set to customize the application's behavior:
| Variable | Default value | Description |
| :------------------- | :---------------------------------- | :----------------------------------------------------------------------------------------- |
| `BASE_URL` | _none_ | Base URL at which the application is deployed. |
| `DATABASE_URL` | `mongodb://localhost/one-chat-room` | [MongoDB connection string](https://docs.mongodb.com/manual/reference/connection-string/). |
| `MONGODB_URI` | _none_ | Same as and takes precedence over `DATABASE_URL`. |
| `MAX_MESSAGE_LENGTH` | 500 | Maximum number of characters allowed in a message. |
| `MAX_MESSAGES` | 10000 | Maximum number of messages the application will store before deleting the oldest ones. |
| `PORT` | 3000 | Port on which to listen to. |