Search for a specific API URL in your fullstack application source, leveraging the power of SWC (what the NextJS's compiler uses) to accurately find usages of a given endpoint.
Your fullstack project must adhere to the specification that the example test_data
project structure showcase. If your files don't follow this structure, you will get gentle and helpful errors when the scraper tries to parse these files.
Ensure that you have the latest stable Rust toolchain installed. If you don't, you can get it through rustup. Then run the following command (beware that Rust compile times are known to be lengthy):
cargo install --git https://github.com/regexPattern/routes-scraper
Remember that you should add your $CARGO_HOME
to your shell path. Read more about this here.
The CLI application documents itself. The display the help menu pass the --help
flag when running the command:
routes-scraper --help
Since the scraper outputs the results as a JSON array of route objects, it is recommended to use a tool like jq to process these results.