From 442da76e9100a8dbb5f69f7bd2372377eeca78dc Mon Sep 17 00:00:00 2001 From: xiang <1984871009@qq.com> Date: Mon, 5 Jun 2023 15:57:06 +0800 Subject: [PATCH] feat: add pool size env --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 4505977..9c420bb 100644 --- a/index.ts +++ b/index.ts @@ -65,7 +65,7 @@ router.get('/ask/stream', async (ctx) => { app.use(router.routes()); (async () => { - await freeBrowserPool.init(5, process.env.DEBUG === '1'); + await freeBrowserPool.init(process.env.POOL_SIZE || 2, process.env.DEBUG === '1'); const server = app.listen(3000, () => { console.log("Now listening: 127.0.0.1:3000"); });