videocall-server
v1.0.1
Published
Production-ready video calling server with WebRTC and Socket.io
Maintainers
Readme
VideoCall Server
Production-ready video calling server with WebRTC, Socket.io, and MongoDB support.
Installation
npm install videocall-serverQuick Start
Basic Setup (No Database)
server.js:
const videocallServer = require('videocall-server');
videocallServer.start({
port: 8000,
corsOrigin: 'http://localhost:3000'
});Run: node server.js
With MongoDB
server.js:
require('dotenv').config();
const videocallServer = require('videocall-server');
videocallServer.start({
port: process.env.PORT || 8000,
mongoUrl: process.env.MONGODB_URI,
corsOrigin: process.env.CORS_ORIGIN || '*'
});.env:
PORT=8000
MONGODB_URI=mongodb+srv://username:[email protected]/videocall
CORS_ORIGIN=http://localhost:3000Run: node server.js
Features
✅ WebRTC peer-to-peer connections
✅ Socket.io real-time signaling
✅ Waiting room with host approval
✅ Chat messaging
✅ MongoDB meeting history (optional)
✅ Ready for production deployment
Configuration Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| port | number | 8000 | Server port |
| mongoUrl | string | undefined | MongoDB connection URL |
| corsOrigin | string | '*' | CORS allowed origin |
API Endpoints
GET /health- Health checkGET /api/meetings- Get recent meetings (requires MongoDB)
Frontend Integration
Use with videocall-react:
npm install videocall-reactimport { VideoCall } from 'videocall-react';
<VideoCall serverUrl="http://localhost:8000" />License
MIT
