Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved benchmarking of uWebSockets.js #6318

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion javascript/routejs-uwebsocket/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ app
.post("/user", (req, res) => res.end(""))
.use((req, res) => res.writeStatus("404").end(""));

const handler = app.handler();

uWS
.App()
.any("/*", (res, req) => {
const handler = app.handler();
handler(req, res);
})
.listen(3000, () => {
Expand Down
2 changes: 1 addition & 1 deletion javascript/routejs-uwebsocket/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": {
"@routejs/router": "~2.1.0",
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.20.0"
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.23.0"
},
"type": "module"
}
2 changes: 1 addition & 1 deletion javascript/sifrr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"dependencies": {
"@sifrr/server": "~0.0.6",
"graphql": "*",
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.20.0"
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.23.0"
}
}
19 changes: 19 additions & 0 deletions javascript/uwebsockets/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import uWS from "uWebSockets.js";

uWS
.App()
.get("/", (res, req) => {
res.end();
})
.get("/user/:id", (res, req) => {
res.end(req.getParameter(0));
})
.post("/user", (res, req) => {
res.end()
})
.any("/*", (res, req) => {
res.writeStatus("404").end();
})
.listen(3000, () => {
console.log("Server started on port 3000");
});
9 changes: 9 additions & 0 deletions javascript/uwebsockets/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
framework:
website: github.com/uNetworking/uWebSockets.js
version: 20.23.0

build_deps:
- git # required by uWebSockets.js

bin_deps:
- gcompat # required by uWebSockets.js
6 changes: 6 additions & 0 deletions javascript/uwebsockets/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dependencies": {
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.23.0"
},
"type": "module"
}