Socket
Socket
Sign inDemoInstall

@blocklet/crawler

Package Overview
Dependencies
395
Maintainers
2
Versions
312
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @blocklet/crawler

blocklet crawler lib


Version published
Weekly downloads
470
increased by13.53%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

@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');

// init cron job to crawl blocklet that generate SEO pages
initCronCrawlBlocklet({
  time: '0 0 */12 * * *',
});

const router = express.Router();
// init SEO middleware, when request come, we will return the SEO static page
router.use(initSEOMiddleware());

License

This package is licensed under the MIT license.

Keywords

FAQs

Last updated on 25 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc