peers/peerjs-server là dự án Backend trên GitHub, viết chủ yếu bằng TypeScript, với 4.7k sao. Server for PeerJS
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
You can provide config object to PeerServer function or specify options for peerjs CLI.
CLI option
JS option
Description
Required
Default
--port, -p
port
Port to listen (number)
Yes
--key, -k
key
Connection key (string). Client must provide it to call API methods
No
"peerjs"
--path
path
Path (string). The server responds for requests to the root URL + path. E.g. Set the path to /myapp and run server on 9000 port via peerjs --port 9000 --path /myapp Then open http://127.0.0.1:9000/myapp - you should see a JSON reponse.
No
"/"
--proxied
proxied
Set true if PeerServer stays behind a reverse proxy (boolean)
No
false
--expire_timeout, -t
expire_timeout
The amount of time after which a message sent will expire, the sender will then receive a EXPIRE message (milliseconds).
No
5000
--alive_timeout
alive_timeout
Timeout for broken connection (milliseconds). If the server doesn't receive any data from client (includes pong messages), the client's connection will be destroyed.
No
60000
--concurrent_limit, -c
concurrent_limit
Maximum number of clients' connections to WebSocket server (number)
No
5000
--sslkey
sslkey
Path to SSL key (string)
No
--sslcert
sslcert
Path to SSL certificate (string)
No
--allow_discovery
allow_discovery
Allow to use GET /peers http API method to get an array of ids of all connected clients (boolean)
No
--cors
corsOptions
The CORS origins that can access this server
generateClientId
A function which generate random client IDs when calling /id API method (() => string)
Make sure to set the proxied option, otherwise IP based limiting will fail.
The option is passed verbatim to the
expressjs trust proxy setting
if it is truthy.
This will start a peerjs server on port 9000 exposed on port 9000 with key peerjs on path /myapp.
Open your browser with http://localhost:9000/myapp It should returns JSON with name, description and website fields. http://localhost:9000/myapp/peerjs/id - should returns a random string (random client id)
Running in Google App Engine
Google App Engine will create an HTTPS certificate for you automatically,
making this by far the easiest way to deploy PeerJS in the Google Cloud
Platform.
Create an app.yaml file to configure the GAE application.
runtime: nodejs
# Flex environment required for WebSocket support, which is required for PeerJS.
env: flex
# Limit resources to one instance, one CPU, very little memory or disk.
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 0.5
Create server.js (which node will run by default for the start script):
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/peers/peerjs-server là nguồn chính thức.
peers/peerjs-server có bao nhiêu sao?
peers/peerjs-server có 4.7k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/peers/peerjs-server. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
peers/peerjs-server có những chủ đề gì?
GitHub topics của peers/peerjs-server: "nodejs", "peerjs", "server", "signaling", "typescript", "webrtc". TopGit xếp repo vào nhóm Backend.
peers/peerjs-server có trang demo không?
Dự án có trang chủ ở https://peerjs.com. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
peers/peerjs-server còn đang phát triển không?
Commit gần nhất trên peers/peerjs-server là 8 tháng trước (theo timestamp GitHub). Repo có 1.1k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
peers/peerjs-server dùng license gì?
peers/peerjs-server phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
peers/peerjs-server viết bằng ngôn ngữ gì?
peers/peerjs-server chủ yếu viết bằng TypeScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
peerjs-server có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về peerjs-server.