Added local host support for the javascript SDK

This commit is contained in:
neev jewalkar
2024-06-18 05:42:25 +05:30
parent a20d002a6b
commit e5ffda1eec
6 changed files with 299 additions and 333 deletions
+2 -2
View File
@@ -18,9 +18,9 @@ export default class FirecrawlApp {
* Initializes a new instance of the FirecrawlApp class.
* @param {FirecrawlAppConfig} config - Configuration options for the FirecrawlApp instance.
*/
constructor({ apiKey = null }) {
this.apiUrl = "https://api.firecrawl.dev";
constructor({ apiKey = null, apiUrl = null }) {
this.apiKey = apiKey || "";
this.apiUrl = apiUrl || "https://api.firecrawl.dev";
if (!this.apiKey) {
throw new Error("No API key provided");
}