Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有可能在本地 unix 管道/套接字上本地侦听 node.js-http 服务器?(例如 /var/tmp/http.sock)。我想将它与WebSockets和反向代理结合使用。
因为 http 基于 net,您可以使用与 net 模块相同的选项。事实上,http 文档明确表示您可以在 unix 套接字上进行侦听。
var server = http.createServer(); server.listen('/var/tmp/http.sock');