UNPKG
occaecatidicta
Version:
latest (1.0.0)
1.0.0
github.com/MyleneMcClure/occaecatidicta.git
MyleneMcClure/occaecatidicta
occaecatidicta
/
packages
/
omelox-rpc
/
sample
/
ws
/
server.js
11 lines
(9 loc)
•
215 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
var
WebSocketServer
=
require
(
'ws'
).
Server
, wss =
new
WebSocketServer
({
port
:
3331
}); wss.
on
(
'connection'
,
function
connection
(
ws
) { ws.
on
(
'message'
,
function
incoming
(
message
) { ws.
send
(message); }); });