Welcome to Firecrawl 🔥! Here are some instructions on how to get the project locally, so you can run it on your own (and contribute)
If you're contributing, note that the process is similar to other open source repos i.e. (fork firecrawl, make changes, run tests, PR). If you have any questions, and would like help gettin on board, reach out to hello@mendable.ai for more or submit an issue!
First, start by installing dependencies
- node.js instructions
- pnpm instructions
- redis instructions
Set environment variables in a .env in the /apps/api/ directory you can copy over the template in .env.example.
To start, we wont set up authentication, or any optional sub services (pdf parsing, JS blocking support, AI features )
.env:
# ===== Required ENVS ======
NUM_WORKERS_PER_QUEUE=8
PORT=3002
HOST=0.0.0.0
REDIS_URL=redis://localhost:6379
REDIS_RATE_LIMIT_URL=redis://localhost:6379
# ===== Optional ENVS ======
# Other Optionals
TEST_API_KEY= # use if you've set up authentication and want to test with a real API key
BULL_AUTH_KEY= @
PLAYWRIGHT_MICROSERVICE_URL= # set if you'd like to run a playwright fallback
First, install the dependencies using pnpm.
pnpm installYou're going to need to open 3 terminals.
Run the command anywhere within your project
redis-serverNow, navigate to the apps/api/ directory and run:
pnpm run workersThis will start the workers who are responsible for processing crawl jobs.
To do this, navigate to the apps/api/ directory and run if you don’t have this already, install pnpm here: https://pnpm.io/installation Next, run your server with:
pnpm run startAlright: now let’s send our first request.
curl -X GET http://localhost:3002/test
This should return the response Hello, world!
If you’d like to test the crawl endpoint, you can run this
curl -X POST http://localhost:3002/v1/crawl \
-H 'Content-Type: application/json' \
-d '{
"url": "https://mendable.ai"
}'
The best way to do this is run the test with npm run test:local-no-auth if you'd like to run the tests without authentication.
If you'd like to run the tests with authentication, run npm run test:prod