Wrap req.getParameter, req.getUrl

This commit is contained in:
Alex Hultman 2019-01-14 12:44:29 +01:00
parent 647a6ef12c
commit 80bc15915b
4 changed files with 65 additions and 27 deletions

View file

@ -7,8 +7,10 @@ const app = uWS./*SSL*/App({
key_file_name: '/home/alexhultman/key.pem',
cert_file_name: '/home/alexhultman/cert.pem',
passphrase: '1234'
}).get('/static/:param', (res, req) => {
res.end('Hello, your url is ' + req.getUrl() + ". The param1 is " + req.getParameter(0));
}).get('/hello', (res, req) => {
res.end('Hejdå!');
res.end('Hej, du är på url: ' + req.getUrl());
}).ws('/*', {
compression: 0,
maxPayloadLength: 16 * 1024 * 1024,