0.0.1 • Published 4 years ago
servut v0.0.1
servut
A server middleware; fast, effective and minimalist
Example code
const servut = require("servut");
const app = servut();
app.setPublic("./public")
app.get("/", (req, res) => {
res.sendFile("index.html");
});
app.listen(3000);
Benchmark results
First benchmark results
first request
first request is finished
--- Benchmark ---
servut benchmark: 6.7ms
express benchmark: 8.404ms
fastify benchmark: 4.638ms
--- Request count in a second --
Servut can request 526 times in a second.
Express can do request 387 times in a second.
Fastify can request 459 times in a second.
Second benchmark results
first request
first request is finished
--- Benchmark ---
servut benchmark: 6.718ms
express benchmark: 9.325ms
fastify benchmark: 5.193ms
--- Request count in a second --
Servut can request 587 times in a second.
Express can do request 469 times in a second.
Fastify can request 462 times in a second.
Third benchmarkes results
first request
first request is finished
--- Benchmark ---
servut benchmark: 6.888ms
express benchmark: 9.646ms
fastify benchmark: 5.387ms
--- Request count in a second --
Servut can request 600 times in a second.
Express can do request 456 times in a second.
Fastify can request 620 times in a second.
also benchmark has done with benchmark/benchmark.js
0.0.1
4 years ago