Hades is an upper framework based on egg, which aims to protect puppeteer related applications. If you don't want to care about Crashed targets which might be caused by chromium bug, OOM, memory corruption etc. Hades is a good choice, because it will help you deal with these problems gracefully.
- Monitor whether the browser is running normally. If the browser suddenly crashes, it will automatically restart.
- Dynamic back-pressure and scheduling for puppeteer-based tasks.
- Support a scheduleStrategy which works in the cluster.
To use Hades in your project, run:
npm i @msfe/Hades
# or "yarn add @msfe/Hades"
The name of framework, default as egg, is a indispensable option to launch an application, set by egg.framwork
of package.json
,then Loader loads the exported app of a module named it. If we consider use Hades, we need to replace egg
with @msfe/Hades
.
{
"scripts": {
"dev": "egg-bin dev"
},
"egg": {
"framework": "@msfe/Hades"
}
}
Find more infos at egg