Update hello world
This commit is contained in:
parent
be83d13c23
commit
fa9005ab1b
@ -178,15 +178,18 @@ async function register ({
|
||||
}, 1000)
|
||||
})
|
||||
|
||||
registerWebSocketRoute({
|
||||
route: '/toto',
|
||||
// Backward compatibility
|
||||
if (registerWebSocketRoute) {
|
||||
registerWebSocketRoute({
|
||||
route: '/toto',
|
||||
|
||||
handler: (request, socket, head) => {
|
||||
wss.handleUpgrade(request, socket, head, ws => {
|
||||
wss.emit('connection', ws, request)
|
||||
})
|
||||
}
|
||||
})
|
||||
handler: (request, socket, head) => {
|
||||
wss.handleUpgrade(request, socket, head, ws => {
|
||||
wss.emit('connection', ws, request)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
async function unregister () {
|
||||
|
4
peertube-plugin-hello-world/package-lock.json
generated
4
peertube-plugin-hello-world/package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "peertube-plugin-hello-world",
|
||||
"version": "0.0.21",
|
||||
"version": "0.0.22",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "peertube-plugin-hello-world",
|
||||
"version": "0.0.21",
|
||||
"version": "0.0.22",
|
||||
"dependencies": {
|
||||
"ws": "^8.9.0"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "peertube-plugin-hello-world",
|
||||
"version": "0.0.21",
|
||||
"version": "0.0.22",
|
||||
"description": "Hello world PeerTube plugin example",
|
||||
"engine": {
|
||||
"peertube": ">=3.2.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user