mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 10:27:06 +00:00
Fix NodeJS benchmark
Former-commit-id: a1d87cf3a3f4790b9e392dc3c100180284286797
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
||||
const express = require('express');
|
||||
const createWorker = require('throng')
|
||||
|
||||
|
||||
createWorker(createWebServer)
|
||||
|
||||
function createWebServer()
|
||||
{
|
||||
const app = express();
|
||||
|
||||
app.get('/api/values/:id', function (req, res) {
|
||||
@@ -12,3 +19,5 @@ app.listen(5000, function () {
|
||||
'Now listening on: http://localhost:5000\nApplication started. Press CTRL+C to shut down.'
|
||||
)
|
||||
});
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
"author": "Gerasimos (Makis) Maropoulos <kataras2006@hotmail.com>",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"express": "^4.16.0"
|
||||
"express": "^4.16.0",
|
||||
"throng": "4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user