A real-time demo application written with Node.js, Vue and Socket.io: one chat room where anyone can post messages.
-
Clone the repository
-
Install dependencies
cd /path/to/repo npm install
-
Set up environment variables for configuration if needed.
cd /path/to/application
npm run dev
cd /path/to/application
npm start
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. |
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. |