Real-time WebSocket server for Waifu.it, enabling seamless communication between the website and services. ππ¬
- π Real-time updates for connected clients
- π Secure environment with
.env
support - ποΈ MongoDB integration for persistent data
- β‘ Optimized WebSocket handling using
ws
git clone [email protected]:WaifuAPI/ws.git
cd websocket
npm install
Create a .env
file in the root directory and add:
MONGO_URI=your_mongodb_connection_string
PORT=3000
Development Mode:
npm run dev
Production Mode:
npm start
Command | Description |
---|---|
npm run dev |
Start server with nodemon |
npm start |
Start server in production |
npm run lint |
Lint the codebase (if ESLint added) |
- Clients can connect via
ws://localhost:3000
(or your deployed URL). - Listen for messages and send real-time updates.
- Node.js β JavaScript runtime
- ws β Lightweight WebSocket library
- MongoDB β Database integration
- dotenv β Environment variable management
π Waifu.it - Bringing anime magic to real-time! πΈ