Add tests and optimization/compression for rendered metrics

This commit is contained in:
lowlighter
2020-10-13 14:00:48 +02:00
parent 1b738d11d2
commit 39404a9acf
10 changed files with 1055 additions and 32 deletions

View File

@@ -7,6 +7,7 @@
import cache from "memory-cache"
import ratelimit from "express-rate-limit"
import metrics from "./metrics.mjs"
import compression from "compression"
//Load svg template, style and query
async function load() {
@@ -28,6 +29,7 @@
//Setup server
const app = express()
app.use(compression())
const middlewares = []
//Rate limiter middleware
if (ratelimiter) {