fix(benchmarks): broken server initialization
MODIFY
benchmarks/middlewares.js
benchmarks/middlewares.js
@@ -24,4 +24,10 @@ const server = createServer({
httpListener: httpListener({ effects, middlewares }),
});
-server().then(() => console.log(` ${n} middlewares - Marble.js`));
+const bootstrap = async () => {
+ const app = await server;
+ await app();
+ console.log(` ${n} middlewares - Marble.js`);
+};
+
+bootstrap();

MODIFY
benchmarks/routing.js
benchmarks/routing.js
@@ -36,4 +36,10 @@ const server = createServer({
httpListener: httpListener({ middlewares, effects }),
});
-server().then(() => console.log(` ${n} endpoints - Marble.js`));
+const bootstrap = async () => {
+ const app = await server;
+ await app();
+ console.log(` ${n} endpoints - Marble.js`);
+};
+
+bootstrap();

fix(benchmarks): broken server initialization