mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
Fix NodeJS benchmark
Former-commit-id: a1d87cf3a3f4790b9e392dc3c100180284286797
This commit is contained in:
parent
f4b4742eca
commit
d1cc5599b6
|
@ -1,14 +1,23 @@
|
||||||
process.env.NODE_ENV = 'production';
|
process.env.NODE_ENV = 'production';
|
||||||
|
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
const app = express();
|
const createWorker = require('throng')
|
||||||
|
|
||||||
app.get('/api/values/:id', function (req, res) {
|
|
||||||
res.send('value');
|
|
||||||
});
|
|
||||||
|
|
||||||
app.listen(5000, function () {
|
createWorker(createWebServer)
|
||||||
console.log(
|
|
||||||
'Now listening on: http://localhost:5000\nApplication started. Press CTRL+C to shut down.'
|
function createWebServer()
|
||||||
)
|
{
|
||||||
});
|
const app = express();
|
||||||
|
|
||||||
|
app.get('/api/values/:id', function (req, res) {
|
||||||
|
res.send('value');
|
||||||
|
});
|
||||||
|
|
||||||
|
app.listen(5000, function () {
|
||||||
|
console.log(
|
||||||
|
'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>",
|
"author": "Gerasimos (Makis) Maropoulos <kataras2006@hotmail.com>",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^4.16.0"
|
"express": "^4.16.0",
|
||||||
|
"throng": "4.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user