X-Git-Url: https://git.josue.xyz/?p=VSoRC%2F.git;a=blobdiff_plain;f=node_modules%2Fexpress-ws%2Fexamples%2Fparams.js;fp=node_modules%2Fexpress-ws%2Fexamples%2Fparams.js;h=0000000000000000000000000000000000000000;hp=b982a59afb4f7cf818fc9f2386ae9e5e81d95a07;hb=5e96dd57ddd883604e87f62bdddcb111c63a6e1a;hpb=acb5f682a2b75b972710cabd81658f63071324b0 diff --git a/node_modules/express-ws/examples/params.js b/node_modules/express-ws/examples/params.js deleted file mode 100644 index b982a59..0000000 --- a/node_modules/express-ws/examples/params.js +++ /dev/null @@ -1,26 +0,0 @@ -var express = require('express'); -var expressWs = require('..'); - -var expressWs = expressWs(express()); -var app = expressWs.app; - -app.param('world', function (req, res, next, world) { - req.world = world || 'world'; - return next(); -}); - -app.get('/hello/:world', function(req, res, next){ - console.log('hello', req.world); - res.end(); - next(); -}); - -app.ws('/hello/:world', function(ws, req, next) { - ws.on('message', function(msg) { - console.log(msg); - }); - console.log('socket hello', req.world); - next(); -}); - -app.listen(3000)