GithubHelp home page GithubHelp logo

kabhamo / crawling-jobs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gal-dahan/crawling-jobs

0.0 0.0 0.0 480 KB

Scans jobs in Israel By scraping public websites using a Node.js, every six hours.

Home Page: https://jobs-israel.netlify.app

JavaScript 100.00%

crawling-jobs's Introduction

Job Israel

Source code of Jobs-Israel

App Screenshot

Tech Stack

Client: React

Server: Node(v14.17.1), Express, Cheerio, Nodemailer

Database: MongoDB

Run Locally

Install project with npm.

Server:

    cd server
    npm ci

Client:

    cd client 
    npm ci

Start the server and client

npm Start

To set up your environment variables, create a new file named .env in the server folder of the project and copy the contents of .env.example into it. Then, replace the placeholders with your own values:

MONGO=mongodb+srv://username:[email protected]/your-db-name
[email protected]
MAIL_PASSWORD=your-email-password

Debugging

If you would like to change the timing of the CronJob for debugging purposes,or startup the project locally in first time to Start scanning and filling the database. you can modify the cronTime value in the crawling-jobs/server/server.js file. By default, the CronJob is set to run every 6 hours in production, but for debugging purposes, you may want to set it to run more frequently.

To change the timing of the CronJob, find the following code in the crawling-jobs/server/server.js:

const job = new CronJob({
  // 0 */6 * * * every 6 hours --- in production
  cronTime: "0 */6 * * *",
  onTick: function () {
    console.log("start crawling", new Date());
    startComeet();
    startWpComeet();
    startGreenHouse();
  },
  start: true,
  timeZone: 'Europe/Berlin'
});

To change the timing for debugging purposes, you can modify the cronTime value to run more frequently. For example, if you want the CronJob to run every minute, you can change the cronTime value to "* * * * *":

const job = new CronJob({
  // * * * * * every minute --- for Debugging
  cronTime: "* * * * *",
  onTick: function () {
    console.log("start crawling", new Date());
    startComeet();
    startWpComeet();
    startGreenHouse();
  },
  start: true,
  timeZone: 'Europe/Berlin'
});

crawling-jobs's People

Contributors

gal-dahan avatar matanp12 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.