From fab15acc9b20a9eb82346f912938a90decb3c40f Mon Sep 17 00:00:00 2001 From: dimden Date: Mon, 13 Jan 2025 21:18:09 +0200 Subject: [PATCH] Add UltimateExpress (#8153) * feat: add ultimate-express * fix: disable x-powered-by --- javascript/ultimate-express/.gitignore | 2 ++ javascript/ultimate-express/.nvmrc | 1 + javascript/ultimate-express/app.js | 20 ++++++++++++++++++++ javascript/ultimate-express/config.yaml | 6 ++++++ javascript/ultimate-express/package.json | 5 +++++ 5 files changed, 34 insertions(+) create mode 100644 javascript/ultimate-express/.gitignore create mode 100644 javascript/ultimate-express/.nvmrc create mode 100644 javascript/ultimate-express/app.js create mode 100644 javascript/ultimate-express/config.yaml create mode 100644 javascript/ultimate-express/package.json diff --git a/javascript/ultimate-express/.gitignore b/javascript/ultimate-express/.gitignore new file mode 100644 index 00000000000..25c8fdbaba6 --- /dev/null +++ b/javascript/ultimate-express/.gitignore @@ -0,0 +1,2 @@ +node_modules +package-lock.json \ No newline at end of file diff --git a/javascript/ultimate-express/.nvmrc b/javascript/ultimate-express/.nvmrc new file mode 100644 index 00000000000..fa12cf298e4 --- /dev/null +++ b/javascript/ultimate-express/.nvmrc @@ -0,0 +1 @@ +v23.3.0 \ No newline at end of file diff --git a/javascript/ultimate-express/app.js b/javascript/ultimate-express/app.js new file mode 100644 index 00000000000..5e4835278e6 --- /dev/null +++ b/javascript/ultimate-express/app.js @@ -0,0 +1,20 @@ +const express = require('ultimate-express'); + +const app = express(); + +app.set('etag', false); +app.set('x-powered-by', false); + +app.get('/', function (req, res) { + res.send(''); +}); + +app.get('/user/:id', function (req, res) { + res.send(req.params.id); +}); + +app.post('/user', function (req, res) { + res.send(''); +}); + +app.listen(3000); diff --git a/javascript/ultimate-express/config.yaml b/javascript/ultimate-express/config.yaml new file mode 100644 index 00000000000..a1e323903a8 --- /dev/null +++ b/javascript/ultimate-express/config.yaml @@ -0,0 +1,6 @@ +framework: + github: dimdenGD/ultimate-express + version: 1.3.17 + + engines: + - uwebsockets diff --git a/javascript/ultimate-express/package.json b/javascript/ultimate-express/package.json new file mode 100644 index 00000000000..8e4e87345ea --- /dev/null +++ b/javascript/ultimate-express/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "ultimate-express": "~1.3.17" + } +}