Wrap up app.post

This commit is contained in:
Alex Hultman 2019-01-16 22:59:53 +01:00
parent d73f4e8616
commit 24fe602f50
2 changed files with 16 additions and 13 deletions

View file

@ -11,6 +11,9 @@ const app = uWS./*SSL*/App({
res.end('Hello, your url is ' + req.getUrl() + ". The param1 is " + req.getParameter(0));
}).get('/hello', (res, req) => {
res.end('Hej, du är på url: ' + req.getUrl());
}).post('/hello', (res, req) => {
// todo: receive the data here!
res.end('Thanks for the data!');
}).ws('/*', {
compression: 0,
maxPayloadLength: 16 * 1024 * 1024,