mangolango-server
v0.0.16
Published
File synchronization system between local folder and browser via WebSocket.
Readme
mangolango-server - File Synchronization Server
File synchronization system between local folder and browser via WebSocket.
Features
- ✅ Real-time file system change monitoring
- ✅ File and folder synchronization via WebSocket
- ✅ Web interface for viewing project structure
- ✅ Automatic reconnection on connection loss
- ✅ Support for creating, modifying and deleting files/folders
Installation and Setup
1. Install dependencies
bun i2. Start server
bun run devServer will start on port 3003.
Testing
- Start server:
bun run dev - Open web interface in browser
- Click "Connect" to connect to server
- Create, modify or delete files in
./projectfolder - Watch real-time updates in browser
Technical Details
File monitoring
- Uses
chokidarlibrary for cross-platform monitoring - Ignores hidden files (starting with dot)
- Supports events: add, change, unlink, addDir, unlinkDir
WebSocket
- Built-in Bun WebSocket server with pub/sub
- Automatic reconnection with exponential backoff
- Message validation using Zod schemas
- Efficient broadcast through subscription channels
Limitations
- Only text files are supported
- Maximum file size is not limited (but may affect performance)
- No conflict resolution for simultaneous changes
