Skip to content
Merged
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
27 changes: 27 additions & 0 deletions frameworks/JavaScript/aroma.js/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Aroma.js Benchmarking Test

From [aroma.js.org](https://aroma.js.org):

> Aroma.js is a lightweight, feature-rich, and developer-friendly web framework designed to build modern web applications with ease. It provides essential features like routing, middleware, session management, cookie handling, template rendering, static file serving, and more. With its simple API, it enables rapid development of web applications with flexibility.

### Test Type Implementation Source Code

- [JSON](app.js)
- [PLAINTEXT](app.js)

## Important Libraries

The tests were run with:

- [Aroma.js](https://aroma.js.org/)
- [NodeJS](https://nodejs.org/en/)

## Test URLs

### JSON

http://localhost:8080/json

### PLAINTEXT

http://localhost:8080/plaintext
36 changes: 36 additions & 0 deletions frameworks/JavaScript/aroma.js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

const cluster = require('cluster'),
numCPUs = require('os').cpus().length,
Aroma = require('aroma.js');


if (cluster.isPrimary) {
console.log(`Primary ${process.pid} is running`);

for (let i = 0; i < numCPUs; i++) {
cluster.fork();
}

cluster.on('exit', (worker, code, signal) => {
console.log(`worker ${worker.process.pid} died`);
});
} else {
const app = module.exports = new Aroma();

app.parseUrlEncoded();

app.use((req, res, next) => {
res.setHeader("Server", "Aroma.js");
return next();
});

app.get('/json', (req, res) => res.send({ message: 'Hello, World!' }));

app.get('/plaintext', (req, res) => {
res.setHeader('Content-Type', 'text/plain');
res.send('Hello, World!');
});


app.listen(8080);
}
11 changes: 11 additions & 0 deletions frameworks/JavaScript/aroma.js/aroma.js.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:20.16-slim

COPY ./ ./

RUN npm install

ENV NODE_ENV production

EXPOSE 8080

CMD ["node", "app.js"]
21 changes: 21 additions & 0 deletions frameworks/JavaScript/aroma.js/benchmark_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"framework": "aroma.js",
"tests": [{
"default": {
"json_url": "/json",
"plaintext_url": "/plaintext",
"port": 8080,
"approach": "Realistic",
"classification": "Micro",
"framework": "aroma.js",
"language": "JavaScript",
"flavor": "NodeJS",
"platform": "nodejs",
"webserver": "None",
"os": "Linux",
"database_os": "Linux",
"display_name": "aroma.js",
"versus": "nodejs"
}
}]
}
13 changes: 13 additions & 0 deletions frameworks/JavaScript/aroma.js/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[framework]
name = "aroma.js"

[main]
urls.plaintext = "/plaintext"
urls.json = "/json"
approach = "Realistic"
classification = "Micro"
database_os = "Linux"
os = "Linux"
platform = "nodejs"
webserver = "None"
versus = "nodejs"
8 changes: 8 additions & 0 deletions frameworks/JavaScript/aroma.js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "aroma.js",
"dependencies": {
"aroma.js": "1.0.8"
},
"main": "app.js"
}

Loading