### Start ClickupServer Source: https://github.com/dksingh1997/parlel/blob/main/docs/clickup.md Quick start example demonstrating how to import and initialize the ClickupServer, start it, and then stop it. Ensure the server is started before running tests and stopped afterward. ```javascript import { ClickupServer } from "./services/clickup/src/server.js"; const server = new ClickupServer(4790); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start WordPress Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/wordpress.md Quick start example to initialize and start the WordPress server. Ensure to stop the server after use. ```javascript import { WordpressServer } from "./services/wordpress/src/server.js"; const server = new WordpressServer(4844); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start Freshdesk Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/freshdesk.md Quick start example to initialize and start the Freshdesk server. Ensure the server is stopped after tests. ```javascript import { FreshdeskServer } from "./services/freshdesk/src/server.js"; const server = new FreshdeskServer(4782); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start Freshbooks Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/freshbooks.md Quick start example for initializing and starting the FreshbooksServer. Ensure to stop the server after use. ```javascript import { FreshbooksServer } from "./services/freshbooks/src/server.js"; const server = new FreshbooksServer(4872); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start CalComServer Source: https://github.com/dksingh1997/parlel/blob/main/docs/cal-com.md Quick start example to initialize and start the CalComServer. Ensure to stop the server after use. ```javascript import { CalComServer } from "./services/cal-com/src/server.js"; const server = new CalComServer(4849); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start Segment Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/segment.md Quick start example to initialize and start the SegmentServer. Ensure to await server.stop() after your tests. ```javascript import { SegmentServer } from "./services/segment/src/server.js"; const server = new SegmentServer(4815); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start and Stop Opsgenie Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/opsgenie.md Quick start example demonstrating how to initialize, start, and stop the Opsgenie server. Ensure the server is properly closed after tests. ```javascript import { OpsgenieServer } from "./services/opsgenie/src/server.js"; const server = new OpsgenieServer(4880); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start and Stop the Box Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/box.md Quick start example demonstrating how to initialize, start, and stop the Box server. Ensure the server is properly shut down after tests. ```javascript import { BoxServer } from "./services/box/src/server.js"; const server = new BoxServer(4837); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start HuggingfaceInferenceServer Source: https://github.com/dksingh1997/parlel/blob/main/docs/huggingface-inference.md Quick start example to initialize and start the HuggingfaceInferenceServer. Ensure to stop the server after use. ```javascript import { HuggingfaceInferenceServer } from "./services/huggingface-inference/src/server.js"; const server = new HuggingfaceInferenceServer(4756); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Quick Start Example Source: https://github.com/dksingh1997/parlel/blob/main/docs/confluence.md Demonstrates how to initialize and use the ConfluenceServer in your tests. ```APIDOC ## Quick start ```js import { ConfluenceServer } from "./services/confluence/src/server.js"; const server = new ConfluenceServer(4795); await server.start(); // ... run your app/tests ... await server.stop(); ``` ``` -------------------------------- ### Start and Stop GoCardless Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/gocardless.md Quick start example demonstrating how to initialize and manage the GoCardless server instance. Ensure the server is started before running tests and stopped afterwards. ```javascript import { GocardlessServer } from "./services/gocardless/src/server.js"; const server = new GocardlessServer(4871); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start and Stop Ghost Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/ghost.md Quick start example demonstrating how to initialize and manage the GhostServer instance. Ensure the server is started before running tests and stopped afterwards. ```javascript import { GhostServer } from "./services/ghost/src/server.js"; const server = new GhostServer(4845); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start and Stop Npm Registry Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/npm-registry.md Quick start example demonstrating how to initialize, start, and stop the NpmRegistryServer. This is useful for setting up the fake registry in tests. ```javascript import { NpmRegistryServer } from "./services/npm-registry/src/server.js"; const server = new NpmRegistryServer(4776); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start and Stop Stability AI Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/stability-ai.md Quick start example demonstrating how to import, instantiate, start, and stop the Stability AI server. ```javascript import { StabilityAiServer } from "./services/stability-ai/src/server.js"; const server = new StabilityAiServer(4862); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start and Stop Auth0 Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/auth0.md Quick start example demonstrating how to initialize, start, and stop the Auth0 server. This is useful for setting up the emulator in your test environment. ```javascript import { Auth0Server } from "./services/auth0/src/server.js"; const server = new Auth0Server(4817); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start and Stop Coda Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/coda.md Quick start example demonstrating how to initialize, start, and stop the CodaServer. This is useful for setting up the fake API in your testing environment. ```javascript import { CodaServer } from "./services/coda/src/server.js"; const server = new CodaServer(4796); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start and Stop Grafana Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/grafana.md Quick start example demonstrating how to initialize, start, and stop the Grafana server in memory. Requires importing the GrafanaServer class. ```javascript import { GrafanaServer } from "./services/grafana/src/server.js"; const server = new GrafanaServer(4879); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start and Stop Sentry Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/sentry.md Quick start example demonstrating how to initialize, start, and stop the SentryServer. Use this to set up the fake Sentry API for your tests. ```javascript import { SentryServer } from "./services/sentry/src/server.js"; const server = new SentryServer(4773); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start and Stop Voyage AI Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/voyage-ai.md Quick start example demonstrating how to initialize, start, and stop the Voyage AI server. ```javascript import { VoyageAiServer } from "./services/voyage-ai/src/server.js"; const server = new VoyageAiServer(4865); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start and Stop Sanity Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/sanity.md Quick start example demonstrating how to initialize and manage the Sanity server instance. Ensure the server is started before running tests and stopped afterwards. ```javascript import { SanityServer } from "./services/sanity/src/server.js"; const server = new SanityServer(4842); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start Intercom Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/intercom.md Quick start example to initialize and start the Intercom server on a specified port. Ensure to stop the server after use. ```javascript import { IntercomServer } from "./services/intercom/src/server.js"; const server = new IntercomServer(4780); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start DeepseekServer Source: https://github.com/dksingh1997/parlel/blob/main/docs/deepseek.md Initialize and start the DeepseekServer on a specified port. This is the initial setup for running the fake API. ```javascript import { DeepseekServer } from "./services/deepseek/src/server.js"; const server = new DeepseekServer(4752); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start and Stop PagerDuty Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/pagerduty.md Quick start example demonstrating how to initialize, start, and stop the PagerdutyServer. Ensure the server is properly managed during your application or test execution. ```javascript import { PagerdutyServer } from "./services/pagerduty/src/server.js"; const server = new PagerdutyServer(4774); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Quick Start with Google Drive Fake Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/google-drive.md Demonstrates how to start the fake Google Drive server, create a file using the googleapis client, and then stop the server. Ensure the googleapis library is installed. ```javascript import { google } from "googleapis"; import { GoogleDriveServer } from "./services/google-drive/src/server.js"; const server = new GoogleDriveServer(4614); await server.start(); const drive = google.drive({ version: "v3", auth: "test" }); drive.context._options.rootUrl = "http://127.0.0.1:4614/"; const created = await drive.files.create({ requestBody: { name: "notes.txt", mimeType: "text/plain" }, media: { mimeType: "text/plain", body: "hello" }, }); await server.stop(); ``` -------------------------------- ### Quick Start Source: https://github.com/dksingh1997/parlel/blob/main/docs/new-relic.md Initialize and start the New Relic server for testing observability code. ```APIDOC ## Quick start ```js import { NewRelicServer } from "./services/new-relic/src/server.js"; const server = new NewRelicServer(4878); await server.start(); // ... run your app/tests ... await server.stop(); ``` ``` -------------------------------- ### Start and Stop the Google Gemini Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/google-gemini.md Quick start example for initializing and managing the Google Gemini server. Ensure the server is started before running tests and stopped afterward. ```javascript import { GoogleGeminiServer } from "./services/google-gemini/src/server.js"; const server = new GoogleGeminiServer(4749); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Quick Start: Starting the Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/mailerlite.md Demonstrates how to start the MailerLiteServer in memory for testing purposes. ```APIDOC ## Quick start Start the server: ```js import { MailerliteServer } from "./services/mailerlite/src/server.js"; const server = new MailerliteServer(4831); await server.start(); // ... run your app/tests ... await server.stop(); ``` ``` -------------------------------- ### Start and Stop the Help Scout Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/helpscout.md Initialize and start the Help Scout server on a specified port, then stop it after your tests are complete. This is the basic setup for using the emulator. ```javascript import { HelpscoutServer } from "./services/helpscout/src/server.js"; const server = new HelpscoutServer(4786); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start and Stop Paperform Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/paperform.md Quick start example to initialize and run the Paperform server on a specified port. Ensure to stop the server after tests are complete. ```javascript import { PaperformServer } from "./services/paperform/src/server.js"; const server = new PaperformServer(4855); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### SDK Example: Starting a Build Source: https://github.com/dksingh1997/parlel/blob/main/docs/codebuild.md This JavaScript snippet demonstrates how to use the AWS SDK to start a build using the CodeBuild emulator. Ensure the CodeBuildClient is configured with the emulator's endpoint and credentials. ```js import { CodeBuildClient, StartBuildCommand } from "@aws-sdk/client-codebuild"; const cb = new CodeBuildClient({ endpoint: "http://127.0.0.1:4742", region: "us-east-1", credentials: { accessKeyId: "parlel", secretAccessKey: "parlel" }, }); const out = await cb.send(new StartBuildCommand({ projectName: "my-project" })); console.log(out.build.buildStatus); // "SUCCEEDED" ``` -------------------------------- ### Quick Start Source: https://github.com/dksingh1997/parlel/blob/main/docs/jotform.md Demonstrates how to start and stop the JotformServer and make a request to the /user/forms endpoint. ```APIDOC ## Quick start ```js import { JotformServer } from "./services/jotform/src/server.js"; const server = new JotformServer(4846); await server.start(); // ... run your app/tests ... await server.stop(); ``` Point a JotForm client at `http://127.0.0.1:4846`. Authenticate with either the `APIKEY` header or the `?apiKey=` query parameter (any non-empty value is accepted). ```js const res = await fetch("http://127.0.0.1:4846/user/forms", { headers: { APIKEY: "parlel" }, }); const { responseCode, message, content } = await res.json(); ``` ``` -------------------------------- ### Configuration Example Source: https://github.com/dksingh1997/parlel/blob/main/docs/new-relic.md Example environment variables for configuring the New Relic emulator. ```APIDOC ## Configuration — `test.env` ```env NEW_RELIC_API_KEY=parlel NEW_RELIC_LICENSE_KEY=parlel NEW_RELIC_ACCOUNT_ID=1 NEW_RELIC_BASE_URL=http://localhost:4878 ``` ``` -------------------------------- ### Start AdyenServer Source: https://github.com/dksingh1997/parlel/blob/main/docs/adyen.md Import and start the AdyenServer for local testing. Ensure to stop the server after use. ```javascript import { AdyenServer } from "./services/adyen/src/server.js"; const server = new AdyenServer(4869); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start Zoom Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/zoom.md Initialize and start the Zoom server. This is the first step to setting up the emulator for testing. ```javascript import { ZoomServer } from "./services/zoom/src/server.js"; const server = new ZoomServer(4797); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Quick Start: Local Google Docs API Emulation Source: https://github.com/dksingh1997/parlel/blob/main/docs/google-docs.md This snippet demonstrates how to start the Parlel emulator, configure the `googleapis` client to use the local server, and perform basic document operations (create, batch update, get). Ensure the `GoogleDocsServer` is imported and instantiated. ```javascript import { google } from "googleapis"; import { GoogleDocsServer } from "./services/google-docs/src/server.js"; const server = new GoogleDocsServer(4616); await server.start(); const docs = google.docs({ version: "v1", auth: "not-used-by-parlel" }); docs.context._options.rootUrl = "http://127.0.0.1:4616/"; const created = await docs.documents.create({ requestBody: { title: "Parlel Notes" }, }); await docs.documents.batchUpdate({ documentId: created.data.documentId, requestBody: { requests: [{ insertText: { location: { index: 1 }, text: "Hello from parlel\n" } }], }, }); const got = await docs.documents.get({ documentId: created.data.documentId }); console.log(got.data.body.content[0].paragraph.elements[0].textRun.content); await server.stop(); ``` -------------------------------- ### Start PropelAuth Fake Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/propelauth.md Initializes and starts the PropelAuth fake server on a specified port. Ensure to await the start and stop operations. ```javascript import { PropelauthServer } from "./services/propelauth/src/server.js"; const server = new PropelauthServer(4825); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Quick Start: HuggingfaceInferenceServer Source: https://github.com/dksingh1997/parlel/blob/main/docs/huggingface-inference.md Initialize and start the HuggingfaceInferenceServer for testing. ```APIDOC ## Quick start ```js import { HuggingfaceInferenceServer } from "./services/huggingface-inference/src/server.js"; const server = new HuggingfaceInferenceServer(4756); await server.start(); // ... run your app/tests ... await server.stop(); ``` ``` -------------------------------- ### Start Mailjet Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/mailjet.md Demonstrates how to start the Mailjet in-memory server. ```APIDOC ## Start Mailjet Server ### Description Starts the Mailjet in-memory server on a specified port. ### Method ```javascript new MailjetServer(port: number) await server.start() await server.stop() ``` ### Parameters #### Constructor Parameters - **port** (number) - The port to start the server on. ### Usage Example ```javascript import { MailjetServer } from "./services/mailjet/src/server.js"; const server = new MailjetServer(4829); await server.start(); // ... run your app/tests ... await server.stop(); ``` ``` -------------------------------- ### Start ConvertKit Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/convertkit.md Instantiate and start the ConvertkitServer on a specified port. Ensure to stop the server after use. ```javascript import { ConvertkitServer } from "./services/convertkit/src/server.js"; const server = new ConvertkitServer(4667); await server.start(); // ... run your app / tests ... await server.stop(); ``` -------------------------------- ### Start SharePoint Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/sharepoint.md Initialize and start the in-memory SharePoint server. Ensure to stop the server when done. ```javascript import { SharepointServer } from "./services/sharepoint/src/server.js"; const server = new SharepointServer(4798); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start Freshsales Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/freshsales.md Initialize and start the Freshsales server. Ensure to stop the server after use. ```javascript import { FreshsalesServer } from "./services/freshsales/src/server.js"; const server = new FreshsalesServer(4783); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start Paddle Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/paddle.md Initialize and start the PaddleServer with a specified port. This is the first step to running the emulator. ```javascript import { PaddleServer } from "./services/paddle/src/server.js"; const server = new PaddleServer(4765); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start the LinkedIn API Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/linkedin.md Import and start the LinkedinServer on a specified port. This is the initial setup for the emulator. ```javascript import { LinkedinServer } from "./services/linkedin/src/server.js"; const server = new LinkedinServer(4799); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Quick Start: Initialize and Use Qdrant Fake Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/qdrant.md This snippet demonstrates how to start a fake Qdrant server, create a collection, upsert data, perform a search, and then stop the server. It requires the QdrantServer and QdrantClient classes. ```javascript import { QdrantServer } from "../services/qdrant/src/server.js"; import { QdrantClient } from "@qdrant/js-client-rest"; const server = new QdrantServer(6333); await server.start(); const client = new QdrantClient({ url: "http://127.0.0.1:6333", checkCompatibility: false }); await client.createCollection("items", { vectors: { size: 4, distance: "Cosine" } }); await client.upsert("items", { wait: true, points: [{ id: 1, vector: [1, 0, 0, 0], payload: { name: "demo" } }], }); const hits = await client.search("items", { vector: [1, 0, 0, 0], limit: 1 }); await server.stop(); ``` -------------------------------- ### Quick Start: Google Calendar Emulator Source: https://github.com/dksingh1997/parlel/blob/main/docs/google-calendar.md Demonstrates how to set up and use the Google Calendar emulator with the `googleapis` library. This includes starting the server, configuring the client, and creating/scheduling events. ```javascript import { google } from "googleapis"; import { GoogleCalendarServer } from "./services/google-calendar/src/server.js"; const server = new GoogleCalendarServer(4615); await server.start(); const calendar = google.calendar({ version: "v3", auth: "not-used-by-parlel" }); calendar.context._options.rootUrl = "http://127.0.0.1:4615/"; const created = await calendar.calendars.insert({ requestBody: { summary: "Engineering", timeZone: "UTC" }, }); await calendar.events.insert({ calendarId: created.data.id, requestBody: { summary: "Planning", start: { dateTime: "2026-01-01T10:00:00.000Z" }, end: { dateTime: "2026-01-01T11:00:00.000Z" }, }, }); await server.stop(); ``` -------------------------------- ### Start New Relic Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/new-relic.md Initialize and start the New Relic server. This is typically used in testing setups to mock New Relic services. ```javascript import { NewRelicServer } from "./services/new-relic/src/server.js"; const server = new NewRelicServer(4878); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Start Algolia Fake Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/algolia.md Instantiate and start the Algolia fake server on a specified port. This is the initial setup for using the fake API in tests. ```javascript import { AlgoliaServer } from "./services/algolia/src/server.js"; const server = new AlgoliaServer(4884); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Quick Start: Setting up NocoDB Server and Making API Calls Source: https://github.com/dksingh1997/parlel/blob/main/docs/nocodb.md This snippet demonstrates how to start a NocoDB server, create a base and a table, add a record, and then stop the server. It uses axios for making HTTP requests to the fake API. ```javascript import axios from "axios"; import { NocodbServer } from "./services/nocodb/src/server.js"; const server = new NocodbServer(4612); await server.start(); const client = axios.create({baseURL: "http://127.0.0.1:4612"}); const base = await client.post("/api/v2/meta/bases", { title: "CRM" }); const table = await client.post(`/api/v2/meta/bases/${base.data.id}/tables`, { title: "Contacts", columns: [{ title: "Name", uidt: "SingleLineText" }], }); const record = await client.post(`/api/v2/tables/${table.data.id}/records`, { Name: "Ada" }); await server.stop(); ``` -------------------------------- ### Start and Stop Weaviate Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/weaviate.md Initialize and start the Weaviate server on a specified port, and stop it when done. This is the basic setup for using the fake server in tests. ```javascript import { WeaviateServer } from "./services/weaviate/src/server.js"; const server = new WeaviateServer(4859); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Quick Start Meilisearch Service and Client Source: https://github.com/dksingh1997/parlel/blob/main/docs/meilisearch.md Demonstrates how to start the Meilisearch server, create an index, add documents, perform a search, and then stop the server. Ensure the Meilisearch server is running before interacting with the client. ```javascript import { MeiliSearch } from "meilisearch"; import { MeilisearchServer } from "../services/meilisearch/src/server.js"; const server = new MeilisearchServer(7700); await server.start(); const client = new MeiliSearch({ host: "http://127.0.0.1:7700", apiKey: "masterKey" }); await client.createIndex("movies", { primaryKey: "id" }); await client.index("movies").addDocuments([{ id: 1, title: "Interstellar" }]); const results = await client.index("movies").search("interstellar"); await server.stop(); ``` -------------------------------- ### Start and Stop Gravity Forms Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/gravity-forms.md Initialize and start the Gravity Forms server on a specified port. Ensure to stop the server after use. This is the initial setup for running the emulator. ```javascript import { GravityFormsServer } from "./services/gravity-forms/src/server.js"; const server = new GravityFormsServer(4854); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Quick Start: Making a Request Source: https://github.com/dksingh1997/parlel/blob/main/docs/mailerlite.md Shows how to make a POST request to the /api/subscribers endpoint using fetch, including authentication and request body. ```APIDOC ## Quick start Point a client at it (Bearer auth): ```js await fetch("http://127.0.0.1:4831/api/subscribers", { method: "POST", headers: { Authorization: "Bearer parlel-mailerlite-key", "Content-Type": "application/json" }, body: JSON.stringify({ email: "subscriber@parlel.dev", fields: { name: "Sub" } }), }); // => { data: { id, email, status, fields, ... } } ``` ``` -------------------------------- ### Start Service Emulators with Docker Compose Source: https://github.com/dksingh1997/parlel/blob/main/README.md This command starts multiple service emulators defined by the SERVICES environment variable using Docker Compose. Ensure Docker is installed and running. ```bash SERVICES="postgres,redis,stripe,openai,slack" docker compose up ``` -------------------------------- ### SDK Example: Start Backup Job Source: https://github.com/dksingh1997/parlel/blob/main/docs/backup.md Use the AWS SDK for JavaScript to start a backup job with the parlel emulator. Ensure the client is configured with the emulator's endpoint and credentials. ```javascript import { BackupClient, StartBackupJobCommand } from "@aws-sdk/client-backup"; const backup = new BackupClient({ endpoint: "http://127.0.0.1:4741", region: "us-east-1", credentials: { accessKeyId: "parlel", secretAccessKey: "parlel" }, }); await backup.send(new StartBackupJobCommand({ BackupVaultName: "Default", ResourceArn: "arn:aws:dynamodb:us-east-1:000000000000:table/orders", IamRoleArn: "arn:aws:iam::000000000000:role/backup", })); ``` -------------------------------- ### Start Parlel Services with Docker Compose Source: https://github.com/dksingh1997/parlel/blob/main/README.md Use this command to clone the repository, install dependencies, and start specified Parlel services using Docker Compose. This method is recommended for its collision-safe port management. ```bash git clone https://github.com/dksingh1997/parlel && cd parlel npm install # one-time, for the launcher # start just what you need SERVICES="postgres,redis,stripe" npm run up # or everything SERVICES=all npm run up ``` -------------------------------- ### Quick Start Airtable Emulator Source: https://github.com/dksingh1997/parlel/blob/main/docs/airtable.md Demonstrates how to start the Airtable emulator, configure the Airtable client to use the emulator's endpoint, and perform basic operations like creating and selecting records. Ensure the server is started before making requests and stopped afterwards. ```javascript import Airtable from "airtable"; import { AirtableServer } from "./services/airtable/src/server.js"; const server = new AirtableServer(4611); await server.start(); const base = new Airtable({ apiKey: "keyParlel", endpointUrl: "http://127.0.0.1:4611", }).base("appParlel"); const created = await base("Tasks").create({ Name: "Test locally" }); const records = await base("Tasks").select({ pageSize: 10 }).all(); await server.stop(); ``` -------------------------------- ### Start Bitbucket Fake Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/bitbucket.md Instantiate and start the Bitbucket fake server. Ensure to stop the server after use. ```javascript import { BitbucketServer } from "./services/bitbucket/src/server.js"; const server = new BitbucketServer(4769); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### AWS SDK v3 Example for Athena Operations Source: https://github.com/dksingh1997/parlel/blob/main/docs/athena.md This TypeScript example demonstrates how to use the AWS SDK v3 to interact with the parlel Athena emulator. It shows starting a query execution and retrieving its results. ```ts import { AthenaClient, StartQueryExecutionCommand, GetQueryResultsCommand, } from "@aws-sdk/client-athena"; const athena = new AthenaClient({ region: "us-east-1", endpoint: "http://127.0.0.1:4723", credentials: { accessKeyId: "parlel", secretAccessKey: "parlel" }, }); const { QueryExecutionId } = await athena.send( new StartQueryExecutionCommand({ QueryString: "SELECT 1" }), ); const results = await athena.send(new GetQueryResultsCommand({ QueryExecutionId })); ``` -------------------------------- ### Pinecone Local Environment Configuration Source: https://github.com/dksingh1997/parlel/blob/main/docs/pinecone.md Example environment variables for configuring a local Pinecone instance. Ensure these match your local setup. ```env PINECONE_API_KEY=parlel PINECONE_ENVIRONMENT=local PINECONE_CONTROLLER_HOST=http://localhost:5081 ``` -------------------------------- ### Environment Configuration for Testing Source: https://github.com/dksingh1997/parlel/blob/main/docs/posthog.md Example environment variables for configuring the PostHog emulator in a testing environment. Ensure these match your local setup. ```env POSTHOG_API_KEY=phc_parlel POSTHOG_PERSONAL_API_KEY=phx_parlel POSTHOG_HOST=http://localhost:4807 POSTHOG_BASE_URL=http://localhost:4807 ``` -------------------------------- ### StartDeployment Source: https://github.com/dksingh1997/parlel/blob/main/docs/appconfig.md Starts a deployment for a given application and environment. ```APIDOC ## POST /applications/{id}/environments/{envId}/deployments ### Description Starts a deployment for a given application and environment. Deployments complete synchronously. ### Method POST ### Endpoint /applications/{id}/environments/{envId}/deployments ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the application. - **envId** (string) - Required - The ID of the environment. #### Request Body - **ConfigurationProfileId** (string) - Required - The ID of the configuration profile. - **DeploymentStrategyId** (string) - Required - The ID of the deployment strategy. ``` -------------------------------- ### SQL Sequence Operations Source: https://github.com/dksingh1997/parlel/blob/main/docs/postgres.md Examples of SQL commands for interacting with sequences, including getting the next value, current value, and setting the value. ```sql SELECT NEXTVAL('order_id_seq'); SELECT CURRVAL('order_id_seq'); SELECT SETVAL('order_id_seq', 2000); ``` -------------------------------- ### Beehiiv Environment Configuration for Testing Source: https://github.com/dksingh1997/parlel/blob/main/docs/beehiiv.md Example environment variables for configuring the Beehiiv service during local testing. Ensure these match your Beehiiv account and local setup. ```env BEEHIIV_API_KEY=parlel-beehiiv-key BEEHIIV_PUBLICATION_ID=pub_parlel BEEHIIV_BASE_URL=http://localhost:4835 ``` -------------------------------- ### Start Frontegg Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/frontegg.md Initialize and start the Frontegg server on a specified port. Ensure to stop the server when done. ```javascript import { FronteggServer } from "./services/frontegg/src/server.js"; const server = new FronteggServer(4824); await server.start(); // ... run your app/tests ... await server.stop(); ``` -------------------------------- ### Query Sanity API Directly Source: https://github.com/dksingh1997/parlel/blob/main/docs/sanity.md Example of how to interact with the Sanity API endpoint using fetch. This demonstrates making a GET request to query documents of a specific type. ```javascript const res = await fetch( "http://127.0.0.1:4842/v2021-10-21/data/query/production?query=" + encodeURIComponent('*[_type == "post"]'), { headers: { Authorization: "Bearer parlel" } }, ); // { ms, query, result: [...] } ``` -------------------------------- ### AWS SDK for JavaScript CloudTrail Example Source: https://github.com/dksingh1997/parlel/blob/main/docs/cloudtrail.md This snippet demonstrates how to use the AWS SDK for JavaScript to interact with the CloudTrail emulator. It shows creating a trail, starting logging, and looking up events. ```js import { CloudTrailClient, CreateTrailCommand, StartLoggingCommand, LookupEventsCommand, } from "@aws-sdk/client-cloudtrail"; const ct = new CloudTrailClient({ region: "us-east-1", endpoint: "http://127.0.0.1:4734", credentials: { accessKeyId: "parlel", secretAccessKey: "parlel" }, }); await ct.send(new CreateTrailCommand({ Name: "audit", S3BucketName: "logs" })); await ct.send(new StartLoggingCommand({ Name: "audit" })); const { Events } = await ct.send(new LookupEventsCommand({})); console.log(Events[0].EventName); ``` -------------------------------- ### AWS SDK Inspector2 Client Example Source: https://github.com/dksingh1997/parlel/blob/main/docs/inspector2.md Demonstrates how to initialize the Inspector2 client and use ListFindings and Enable commands. Ensure the client is configured with the emulator's endpoint and credentials. ```js import { Inspector2Client, ListFindingsCommand, EnableCommand } from "@aws-sdk/client-inspector2"; const ins = new Inspector2Client({ region: "us-east-1", endpoint: "http://127.0.0.1:4735", credentials: { accessKeyId: "parlel", secretAccessKey: "parlel" }, }); await ins.send(new EnableCommand({ resourceTypes: ["EC2", "ECR"] })); const { findings } = await ins.send(new ListFindingsCommand({})); console.log(findings[0].severity); ``` -------------------------------- ### Node.js Service Emulator Server Class Source: https://github.com/dksingh1997/parlel/blob/main/CONTRIBUTING.md An example of a Node.js server class for a service emulator. It includes start and stop methods and handles a basic health check endpoint. Keep this dependency-free. ```javascript import { createServer } from "node:http"; export class MyServiceServer { constructor(port = 4900) { this.port = port; } start() { return new Promise((resolve) => { this.server = createServer((req, res) => { if (req.url === "/health") { res.writeHead(200, { "Content-Type": "application/json" }); return res.end(JSON.stringify({ status: "ok" })); } // ... implement the real API contract here ... res.writeHead(404); res.end(); }); this.server.listen(this.port, () => resolve()); }); } stop() { return new Promise((r) => (this.server ? this.server.close(r) : r())); } } ``` -------------------------------- ### Start Replicate Server Source: https://github.com/dksingh1997/parlel/blob/main/docs/replicate.md Initialize and start the ReplicateServer on a specified port. This is the first step to setting up the fake API. ```javascript import { ReplicateServer } from "./services/replicate/src/server.js"; const server = new ReplicateServer(4856); await server.start(); // ... run your app/tests ... await server.stop(); ```