@blocklet/crawler
@blocklet/crawler is a package crawler for Blocklet.
Package Structure
The package is composed of both frontend and backend components. The backend code can be found in the middlewares
folder.
Development
Install In Blocklet
# You can use npm / yarn
pnpm add @blocklet/crawler
Install Dependencies
To install the required dependencies, run the following command:
pnpm i
Build Packages
To build the packages, execute the following command:
pnpm build
Build, Watch, and Run Development Server
For building, watching changes, and running the development server, use the following command:
pnpm run dev
Backend Example
const { initSEOMiddleware, initCronCrawlBlocklet } = require('@blocklet/crawler/middlewares');
initCronCrawlBlocklet({
time: '0 0 */6 * * *',
});
const router = express.Router();
router.use(initSEOMiddleware());
License
This package is licensed under the MIT license.