### Start an Example MCP Server Source: https://inspectr.dev/docs/examples/expose-mcp-server If you need an example MCP server, use the Everything MCP server or follow the 'Exposing a FastMCP server' guide. This command starts a streamable HTTP server. ```bash npm run start:streamableHttp ``` -------------------------------- ### Install and Start Inspectr with Homebrew Source: https://inspectr.dev/docs/getting-started/quick-start Install Inspectr using Homebrew and start it by specifying your backend address. This method requires prior installation. ```bash brew tap inspectr-hq/inspectr brew install inspectr inspectr --backend=http://localhost:3000 ``` -------------------------------- ### Install and Start Inspectr with npx Source: https://inspectr.dev/docs/getting-started/quick-start Install and run Inspectr without global installation using npx. Point it to your local backend. ```bash npx @inspectr/inspectr --backend=http://localhost:3000 ``` -------------------------------- ### Initialize and Start Laravel Application Source: https://inspectr.dev/docs/examples/using-with-laravel-php Commands to create a new Laravel project, install dependencies, and start the development server. ```bash laravel new myapp cd myapp npm install && npm run build composer run dev # php artisan serve --port=8000 ``` -------------------------------- ### Start a Local MCP Server Source: https://inspectr.dev/docs/examples/expose-mcp-server-openai Ensure your MCP-compatible server is running locally. This example starts a server on port 3000. ```bash mcp-server --port 3000 ``` -------------------------------- ### Install and Start Inspectr with npm Source: https://inspectr.dev/docs/getting-started/quick-start Install Inspectr globally using npm and then run it, directing it to your local backend. This is an alternative to npx or Homebrew. ```bash npm install -g @inspectr/inspectr inspectr --backend=http://localhost:3000 ``` -------------------------------- ### Start a Local MCP Server Source: https://inspectr.dev/docs/examples/expose-mcp-server Use this command to start your existing MCP server. Ensure Node.js 22+ and npm/npx are installed. ```bash mcp-server --port 3001 ``` -------------------------------- ### Start Ollama Locally Source: https://inspectr.dev/docs/examples/expose-ollama Ensure Ollama is installed and running on your local machine. This command starts the Ollama server. ```bash ollama serve ``` -------------------------------- ### Example Inspectr Ingress URL Source: https://inspectr.dev/docs/guides/exposing-publicly This example shows how an Inspectr Ingress URL maps to a local backend service. No setup is required beyond running Inspectr with the --expose flag. ```text https://my-api.in-spectr.dev → http://localhost:8080 ``` -------------------------------- ### Install FastMCP Source: https://inspectr.dev/docs/examples/expose-your-fastmcp Install FastMCP directly using uv or pip. ```bash # Using uv uv pip install fastmcp ``` ```bash # Using pip pip install fastmcp ``` -------------------------------- ### Scaffold and Run a .NET Web API Source: https://inspectr.dev/docs/examples/using-with-dotnet Use the .NET CLI to create a new project and start the development server. ```bash dotnet new webapi -n MyApiApp cd MyApiApp dotnet run ``` -------------------------------- ### Example API Call via Inspectr Source: https://inspectr.dev/docs/examples/using-with-java-spring Make a sample API call to your Spring Boot application through Inspectr to verify the setup. ```bash curl http://localhost:8181/api/hello ``` -------------------------------- ### Install FastAPI and Uvicorn Source: https://inspectr.dev/docs/examples/using-with-python-fastapi Installs the necessary packages for running a FastAPI application. ```bash pip install fastapi uvicorn ``` -------------------------------- ### Start Inspectr with --expose Source: https://inspectr.dev/docs/examples/use-github-actions-ingress Run this command to open a public channel that forwards traffic to your backend service. ```bash inspectr \ --backend=http://api.staging.com \ --expose \ --channel=ci-tests \ --channel-code=secret123 ``` -------------------------------- ### Build and Preview EventCatalog Locally Source: https://inspectr.dev/docs/examples/expose-your-event-catalog Build the EventCatalog project and start the local preview server. The default preview URL is http://localhost:3000. ```bash npm run build && npm run preview ``` -------------------------------- ### Run an Ollama Model Source: https://inspectr.dev/docs/examples/expose-ollama After starting the Ollama server, run a specific model to make it available for requests. This example uses llama3.2. ```bash ollama run llama3.2 ``` -------------------------------- ### Create a Simple Flask App Source: https://inspectr.dev/docs/examples/using-with-python-flask Defines a basic Flask application with a '/hello' endpoint. Ensure Flask is installed (`pip install flask`). ```python from flask import Flask, request, jsonify app = Flask(__name__) @app.route('/hello', methods=['GET']) def hello(): return jsonify({"message": "Hello from Flask!"}) if __name__ == '__main__': app.run(port=5000) ``` -------------------------------- ### Start Node.js/Express App Source: https://inspectr.dev/docs/getting-started/quick-start Run your Node.js/Express backend application. Ensure it is listening on the expected port. ```bash # Example: Node.js/Express app on port 3000 npm start ``` -------------------------------- ### Define Static Mock Example Source: https://inspectr.dev/docs/features/mocking Include an example value within the OpenAPI path definition to enable static response mocking. ```yaml paths: /items: get: responses: '200': description: Success content: application/json: examples: default: value: items: ['A', 'B', 'C'] ``` -------------------------------- ### Example Request for Static Mocking Source: https://inspectr.dev/docs/features/inspectr-operation-modes A simple GET request to the `/items` endpoint, which will be served by Inspectr using the static mock response. ```bash curl -i http://localhost:8080/items ``` -------------------------------- ### Example Static Mock Response Source: https://inspectr.dev/docs/features/inspectr-operation-modes The static JSON response served by Inspectr for the `/items` GET request, based on the OpenAPI example. ```http HTTP/1.1 200 OK Content-Type: application/json {"items":["A","B","C"]} ``` -------------------------------- ### Install MCPLab CLI Source: https://inspectr.dev/docs/guides/mcp-server-eval-with-mcplab Methods for installing or running the MCPLab CLI tool. ```bash # One-off usage npx @inspectr/mcplab --help ``` ```bash # Install globally to get the `mcplab` command npm install -g @inspectr/mcplab ``` -------------------------------- ### Example Inspectr YAML Configuration Source: https://inspectr.dev/docs/configuration/yaml-config This is an example of a `.inspectr.yaml` file. Commit this to version control for team use. Avoid storing sensitive tokens directly; use environment variables or secrets management instead. ```yaml listen: ':8080' backend: 'http://localhost:3000' print: true app: true appPort: '4004' expose: true channel: 'hello-world' channelCode: '87654321' authEnabled: true authSecret: 'letsgo' apiSecret: 'changeme' ``` -------------------------------- ### Start Inspectr with Authentication Enabled Source: https://inspectr.dev/docs/features/access-authentication Enable authentication and set a secret when starting Inspectr via CLI. ```bash inspectr --auth-enabled=true --auth-secret=mysecret ``` -------------------------------- ### Example OpenAPI Snippet for Static Mocking Source: https://inspectr.dev/docs/features/inspectr-operation-modes An OpenAPI specification snippet defining a GET endpoint `/items` with a static JSON response example. ```yaml paths: /items: get: responses: "200": description: Success content: application/json: examples: default: value: items: ["A", "B", "C"] ``` -------------------------------- ### Launch Mock Server in Browser Source: https://inspectr.dev/docs/getting-started/mocking-quick-start Open this URL in your browser and replace the `openapi` parameter with the URL of your OpenAPI file. Inspectr will immediately start mocking. ```url https://inspectr.dev/launch?openapi=https://inspectr.dev/demo/hello.openapi.yaml ``` -------------------------------- ### Start Inspectr with Backend Configuration Source: https://inspectr.dev/docs/concepts/how-it-works Launch Inspectr and specify the backend service to forward requests to. This is a common way to integrate Inspectr into an existing application. ```bash inspectr --backend=http://localhost:3000 ``` -------------------------------- ### Start PHP Development Server Source: https://inspectr.dev/docs/examples/using-with-php Launches PHP's built-in development server, serving files from the 'public' directory on port 8000. ```bash php -S localhost:8000 -t public ``` -------------------------------- ### Enable Verbose Logging Source: https://inspectr.dev/docs/reference/troubleshooting To get more detailed logs for troubleshooting, use the --log-level=debug flag when starting Inspectr. ```bash inspectr --log-level=debug ``` -------------------------------- ### Example Webhook Endpoint Source: https://inspectr.dev/docs/guides/webhook-debugging This is an example of a specific webhook endpoint that third-party services can send events to. ```bash https://webhooks.in-spectr.dev/events ``` -------------------------------- ### Start Express App Source: https://inspectr.dev/docs/examples/using-with-express This snippet shows how to start a basic Express application that listens on port 3000 and handles POST requests to '/api/data'. Ensure your Express app is running before setting up Inspectr. ```javascript const express = require('express'); const app = express(); app.use(express.json()); app.post('/api/data', (req, res) => { console.log('Received:', req.body); res.status(200).json({ message: 'OK' }); }); app.listen(3000, () => console.log('Server running on port 3000')); ``` -------------------------------- ### Start Inspectr in Catch Mode Source: https://inspectr.dev/docs/examples/handling-stripe-webhooks Use this command to start Inspectr in catch mode. It accepts incoming requests, automatically returns 200 OK, and displays webhook events in the Inspectr App UI. ```bash inspectr --catch=true --expose --channel=stripe-webhooks --channel-code=webhooks123 ``` -------------------------------- ### Start Mock Server from CLI Source: https://inspectr.dev/docs/getting-started/mocking-quick-start Run Inspectr locally using npx and provide the path to your OpenAPI specification using the `--mock-backend` flag. The proxy will listen on port 8080 and the UI on port 4004. ```bash npx @inspectr/inspectr --mock-backend=https://inspectr.dev/demo/hello.openapi.yaml ``` -------------------------------- ### Exported file path example Source: https://inspectr.dev/docs/features/inspectr-export Shows the default naming convention for generated export files. ```text 📦 Exported operations: exports/inspectr_operations_2026-01-04-142843_inst_1757169902.json ``` -------------------------------- ### Start Flask App Source: https://inspectr.dev/docs/examples/using-with-python-flask Command to run the Flask application defined in `app.py`. Assumes Python 3.8+. ```bash python app.py ``` -------------------------------- ### Return a Named OpenAPI Example Source: https://inspectr.dev/docs/features/response-override Select a specific example defined in your OpenAPI specification using the `inspectr-response-example` header. ```yaml examples: validList: summary: A list of valid items value: items: ["A", "B", "C"] emptyList: summary: An empty list value: items: [] ``` ```curl curl http://localhost:8080/api/items \ -H "inspectr-response-example: emptyList" ``` -------------------------------- ### Start Inspectr in Catch Mode with Homebrew/npm Source: https://inspectr.dev/docs/getting-started/quick-start Enable catch mode for Inspectr installed via Homebrew or npm. This allows inspection of requests without a configured backend. ```bash inspectr --catch=true ``` -------------------------------- ### Generated Dynamic Response Example Source: https://inspectr.dev/docs/features/mocking An example of the JSON output produced when dynamic mocking is active. ```json { "id": 12608726, "name": "Addison", "photoUrls": ["http://lorempixel.com/640/480", "http://lorempixel.com/640/480"] } ``` -------------------------------- ### Start Backend Service Source: https://inspectr.dev/docs/guides/api-traffic-debugging Ensure your API service is running locally. Use 'npm run dev' for Node.js projects or 'python app.py' for Python applications. ```bash npm run dev # or python app.py ``` -------------------------------- ### Example Dynamic Mock Response Source: https://inspectr.dev/docs/features/inspectr-operation-modes A dynamically generated JSON response for the `/items` GET request, conforming to the schema defined in the OpenAPI specification. ```http HTTP/1.1 200 OK Content-Type: application/json {"items":["KqTzL","p9aV2","mR1xQ"]} ``` -------------------------------- ### Example Webhook Request Source: https://inspectr.dev/docs/features/inspectr-operation-modes A sample POST request to a webhook endpoint, including a JSON payload. ```bash curl -i -X POST http://localhost:8080/webhook \ -H "content-type: application/json" \ -d '{"type":"ping","id":"evt_123"}' ``` -------------------------------- ### Scaffold an EventCatalog Project Source: https://inspectr.dev/docs/examples/expose-your-event-catalog Use this command to create a new EventCatalog project. It scaffolds the necessary structure and installs dependencies. ```bash npx @eventcatalog/create-eventcatalog@latest my-catalog cd my-catalog npm install ``` -------------------------------- ### Start Inspectr in Catch Mode Source: https://inspectr.dev/docs/examples/handling-generic-webhooks Initializes the Inspectr tool to capture incoming webhooks with public exposure enabled. ```bash inspectr --catch=true --expose --channel=webhooks --channel-code=webhooks123 ``` -------------------------------- ### Configure Webhook Destination Source: https://inspectr.dev/docs/examples/handling-generic-webhooks Example of a webhook destination URL configured in an external platform. ```text https://webhooks.in-spectr.dev/my-webhook-endpoint ``` -------------------------------- ### Launch Inspectr Proxy Source: https://inspectr.dev/docs/examples/using-with-php Starts Inspectr and configures it to proxy traffic to the specified backend PHP server. ```bash inspectr --backend=http://localhost:8000 ``` -------------------------------- ### Launch Inspectr Proxy Source: https://inspectr.dev/docs/guides/mcp-server-eval-with-mcplab Starts the Inspectr proxy server with export enabled to capture MCP traffic. ```bash inspectr \ --backend http://localhost:3000 \ --export ``` -------------------------------- ### Start Inspectr Proxy Source: https://inspectr.dev/docs/examples/use-inspectr-with-postman-newman-bruno Initializes the Inspectr proxy to forward traffic to a local backend and provides the UI access URL. ```bash inspectr --backend=http://localhost:3000 # Proxy listens on http://localhost:8080 (default) # Open the Inspectr UI at http://localhost:4004 to browse captured traffic ``` -------------------------------- ### Start Inspectr Proxy Source: https://inspectr.dev/docs/examples/using-with-dotnet Forward traffic from the Inspectr proxy to the local .NET backend. ```bash inspectr --backend=http://localhost:5000 ``` -------------------------------- ### Install Inspectr with Homebrew Source: https://inspectr.dev/docs/getting-started/installation Install Inspectr on macOS using Homebrew. This method allows for easy updates using `brew upgrade inspectr`. ```bash brew tap inspectr-hq/inspectr brew install inspectr ``` ```bash inspectr --backend=http://localhost:3000 ``` -------------------------------- ### Backend Response Example Source: https://inspectr.dev/docs/features/inspectr-operation-modes The HTTP response returned by the backend service through Inspectr. ```http HTTP/1.1 200 OK Content-Type: application/json {"message":"hello from backend"} ``` -------------------------------- ### Run Inspectr as a proxy Source: https://inspectr.dev/docs/examples/using-with-python-django Starts the Inspectr proxy pointing to the local Django server and demonstrates how to send a test request. ```bash inspectr --backend=http://localhost:8000 ``` ```bash curl http://localhost:8080/ ``` -------------------------------- ### Run FastAPI App with Uvicorn Source: https://inspectr.dev/docs/examples/using-with-python-fastapi Starts the FastAPI development server using Uvicorn on port 5001. ```bash uvicorn main:app --port 5001 ``` -------------------------------- ### Run a local dev server via CLI Source: https://inspectr.dev/docs/features/inspectr-command-runner Executes a command and its arguments directly from the command line when starting Inspectr. ```bash inspectr --command=npm --command-arg=run --command-arg=dev ``` -------------------------------- ### Install Inspectr Globally with npm Source: https://inspectr.dev/docs/getting-started/installation Install Inspectr globally using npm for cross-platform compatibility on Windows, macOS, and Linux. Updates can be managed with `npm update -g @inspectr/inspectr`. ```bash npm install -g @inspectr/inspectr ``` ```bash inspectr --backend=http://localhost:3000 ``` -------------------------------- ### Execute Backend Request Source: https://inspectr.dev/docs/features/inspectr-operation-modes Example curl command to send a request to the Inspectr proxy. ```bash curl -i http://localhost:8080/hello ``` -------------------------------- ### Start n8n Locally Source: https://inspectr.dev/docs/examples/expose-n8n-workflow Run n8n locally with webhook endpoints enabled. This can be done via npx or Docker. ```bash npx n8n ``` ```bash docker run -it --rm \ -p 5678:5678 \ -e N8N_HOST=localhost \ -e N8N_PORT=5678 \ -e N8N_PROTOCOL=http \ -e WEBHOOK_TUNNEL_URL=http://localhost:8080 \ n8nio/n8n ``` -------------------------------- ### Create a Simple FastAPI App Source: https://inspectr.dev/docs/examples/using-with-python-fastapi Defines a basic FastAPI application with a single GET endpoint. ```python from fastapi import FastAPI app = FastAPI() @app.get("/hello") def read_root(): return {"message": "Hello from FastAPI!"} ``` -------------------------------- ### Start MCP Inspector for Testing Source: https://inspectr.dev/docs/examples/expose-mcp-server Launch the MCP Inspector, a visual testing tool for MCP servers. Use the Inspectr session URL to connect. ```bash npx @modelcontextprotocol/inspector ``` -------------------------------- ### Start Inspectr to Forward Traffic Source: https://inspectr.dev/docs/examples/using-with-python-fastapi Launches Inspectr, forwarding traffic to the specified backend FastAPI application. ```bash inspectr --backend=http://localhost:5001 ``` -------------------------------- ### Start Inspectr with a Backend Source: https://inspectr.dev/docs/guides/frontend-inspection Configure Inspectr to listen on localhost:8080 and forward requests to your specified backend API. Use the --listen flag to change the default listening address. ```bash inspectr --backend=https://api.example.com ``` -------------------------------- ### Start Inspectr with Backend Flag Source: https://inspectr.dev/docs/guides/proxy-public-api Run Inspectr locally and specify the remote API using the --backend flag. Inspectr will then forward incoming requests to this address. ```bash inspectr --backend=https://api.openbrewerydb.org ``` -------------------------------- ### Run FastMCP Server and Inspectr Proxy (Python) Source: https://inspectr.dev/docs/examples/expose-your-fastmcp Start the FastMCP server using Python and then run Inspectr as a proxy. Inspectr forwards traffic to the FastMCP server, enabling traffic capture and inspection. ```bash # Terminal 1: Start FastMCP server python weather.py # Terminal 2: Start Inspectr proxy inspectr --backend=http://localhost:8000 ``` -------------------------------- ### Start Inspectr in Catch Mode Source: https://inspectr.dev/docs/guides/webhook-debugging Use `--catch=true` to capture and log all incoming requests without forwarding them to a backend. The UI is available at http://localhost:4004. ```bash inspectr --catch=true ``` -------------------------------- ### Start Inspectr to Forward Requests to n8n Source: https://inspectr.dev/docs/examples/expose-n8n-workflow Launch Inspectr to forward incoming requests to your local n8n server. Inspectr will expose your service and provide real-time logs. ```bash inspectr --backend=http://localhost:5678 --expose --channel=n8n-demo --channel-code=n8ndemo123 ``` -------------------------------- ### Run FastMCP Server and Inspectr Proxy (UV) Source: https://inspectr.dev/docs/examples/expose-your-fastmcp Start the FastMCP server using uv and then run Inspectr as a proxy to capture traffic. Inspectr will listen on port 8080 and forward to the FastMCP server on port 8000. ```bash # Terminal 1: Start FastMCP server uv run python weather.py # Terminal 2: Start Inspectr proxy inspectr --backend=http://localhost:8000 ``` -------------------------------- ### Configure and Run Inspectr On-Premise Source: https://inspectr.dev/docs/examples/expose-onprem-rest-api Configure Inspectr to point to your internal service and expose it. This command starts Inspectr, forwards requests to the specified backend, and makes the service accessible via a public URL. ```bash inspectr \ --backend=http://intranet.local:5000 \ --expose \ --channel=internal-api \ --channel-code=access123 ``` -------------------------------- ### Run Inspectr with Expose Mode Source: https://inspectr.dev/docs/guides/exposing-publicly Start Inspectr with the `--expose` flag to enable public access to your local service. Use `--channel` to set a custom subdomain. The public URL will be displayed in the terminal upon launch. ```bash inspectr --backend=http://localhost:3000 --expose --channel=my-api --channel-code=secret123 ``` -------------------------------- ### Example Request with cURL Source: https://inspectr.dev/docs/features/inspectr-operation-modes This cURL command demonstrates how to send a POST request with JSON payload and custom headers to a webhook endpoint. Use this to test client or SDK behavior when interacting with your services. ```bash curl -i -X POST http://localhost:8080/webhook/test \ -H "content-type: application/json" \ -H "x-source: stripe" \ -d '{ "event": "payment.succeeded", "id": "evt_123", "amount": 4200 }' ``` -------------------------------- ### Start Inspectr in Catch Mode with npx Source: https://inspectr.dev/docs/getting-started/quick-start Enable catch mode using npx to accept and inspect any HTTP requests without a specified backend. All requests will receive a 200 OK response. ```bash npx @inspectr/inspectr --catch=true ``` -------------------------------- ### Create PHP Project Structure Source: https://inspectr.dev/docs/examples/using-with-php Sets up the directory structure for a basic PHP project. ```bash mkdir php-demo cd php-demo mkdir public ``` -------------------------------- ### Initialize and run a Django project Source: https://inspectr.dev/docs/examples/using-with-python-django Commands to scaffold a new Django project and launch the development server on port 8000. ```bash django-admin startproject mysite cd mysite python manage.py runserver 8000 ``` -------------------------------- ### Configure startup command in .inspectr.yaml Source: https://inspectr.dev/docs/features/inspectr-command-runner Defines the command and arguments to run automatically upon Inspectr startup using the configuration file. ```yaml # Command command: node commandArgs: - demo.js ``` ```yaml # Command command: node commandArgs: - demo.js commandLogFile: demo-process.log ``` -------------------------------- ### Run Inspectr with configuration Source: https://inspectr.dev/docs/configuration/cli-options Load configuration from the default .inspectr.yaml file or specify a custom path using the --config flag. ```bash inspectr ``` ```bash inspectr --config=./inspectr-webhook.yaml ``` -------------------------------- ### Upgrade Global npm Install Source: https://inspectr.dev/docs/getting-started/upgrade Update a globally installed Inspectr package using npm. If needed, you can force a clean reinstall by uninstalling and then installing again. Verify the version afterward. ```bash npm update -g @inspectr/inspectr ``` ```bash npm uninstall -g @inspectr/inspectr npm install -g @inspectr/inspectr ``` ```bash inspectr --version ``` -------------------------------- ### Enable App and Set App Port Source: https://inspectr.dev/docs/reference/troubleshooting If the Inspectr UI is not loading, ensure the app is enabled and specify its port using --app=true and --app-port. ```bash --app=true --app-port=4004 ``` -------------------------------- ### Run Inspectr from Binary Source: https://inspectr.dev/docs/getting-started/installation Execute Inspectr by downloading the standalone binary for your platform. Ensure the binary is executable using `chmod +x ./inspectr`. ```bash ./inspectr --backend=http://localhost:3000 ``` -------------------------------- ### Create a Spring Boot App with Maven Source: https://inspectr.dev/docs/examples/using-with-java-spring Use curl to download and unzip a new Spring Boot project with the web dependency. Then, navigate into the project directory and run the application using the Maven wrapper. ```bash curl https://start.spring.io/starter.zip \ -d dependencies=web \ -d name=DemoApi \ -o demo.zip unzip demo.zip && cd DemoApi ./mvnw spring-boot:run ``` -------------------------------- ### Example Mirrored Response Source: https://inspectr.dev/docs/features/inspectr-operation-modes This is an example of a mirrored HTTP response, showing a 200 OK status and a JSON payload. Inspectr echoes the request back, allowing you to verify the exact data being sent. ```http HTTP/1.1 200 OK Content-Type: application/json { "event": "payment.succeeded", "id": "evt_123", "amount": 4200 } ``` -------------------------------- ### Enable Guard with CLI Flags Source: https://inspectr.dev/docs/features/access-authentication Configure authentication settings using command-line flags. ```bash inspectr --auth-enabled=true --auth-secret=mysecret --auth-token-ttl=24 ``` -------------------------------- ### Configure Mock Backend via CLI Source: https://inspectr.dev/docs/features/mocking Specify the OpenAPI source using the --mock-backend parameter for local files or public URLs. ```bash inspectr --mock-backend=./openapi.yaml ``` ```bash inspectr --mock-backend=https://inspectr.dev/demo/hello.openapi.yaml ``` -------------------------------- ### Customize Token TTL Source: https://inspectr.dev/docs/features/access-authentication Set the token lifetime in hours when starting Inspectr. Default is 24 hours. ```bash inspectr --auth-enabled=true --auth-secret=mysecret --auth-token-ttl=2 ``` -------------------------------- ### Example Webhook Response Source: https://inspectr.dev/docs/features/inspectr-operation-modes A typical successful response from a webhook endpoint, indicating a 200 OK status with no content. ```http HTTP/1.1 200 OK Content-Length: 0 ``` -------------------------------- ### Upgrade Inspectr via Homebrew Source: https://inspectr.dev/docs/getting-started/upgrade Upgrade Inspectr using Homebrew on macOS. After upgrading, verify the installation with the version command. ```bash brew update brew upgrade inspectr ``` ```bash inspectr --version ``` -------------------------------- ### Test Laravel Route via Inspectr Source: https://inspectr.dev/docs/examples/using-with-laravel-php Example curl command to verify the proxy is forwarding requests to the Laravel API. ```bash curl http://localhost:8080/api/user ``` -------------------------------- ### Configure Backend Mode Source: https://inspectr.dev/docs/features/inspectr-operation-modes Defines the backend URL and optional UI settings in the .inspectr.yaml configuration file. ```yaml backend: "http://localhost:3000" # Other options as example app: true appPort: "4004" print: true ``` -------------------------------- ### Mocking API Design with OpenAPI Source: https://inspectr.dev/docs/concepts/api-lifecycle Serves responses directly from an OpenAPI specification file to enable frontend development before backend implementation. ```bash inspectr --mock-backend=./openapi.yaml ``` -------------------------------- ### Inspectr Configuration for Ollama Source: https://inspectr.dev/docs/examples/expose-ollama Start Inspectr to act as a proxy for your local Ollama instance. It forwards traffic, logs requests, and requires an access code. ```bash inspectr \ --backend=http://localhost:11434 \ --expose \ --channel=ollama-demo \ --channel-code=ollama123 ``` -------------------------------- ### Access Exposed Internal API Source: https://inspectr.dev/docs/examples/expose-onprem-rest-api Connect to your internal API using the Inspectr-generated public URL. This example demonstrates accessing the health endpoint of the exposed API. ```bash curl https://internal-api.in-spectr.dev/health ``` -------------------------------- ### Enable Guard in .inspectr.yaml Source: https://inspectr.dev/docs/features/access-authentication Configure authentication settings in the .inspectr.yaml file. ```yaml authEnabled: true authSecret: mysecret authTokenTtl: 24 ``` -------------------------------- ### Make Binary Executable Source: https://inspectr.dev/docs/getting-started/upgrade After downloading a new Inspectr binary, make it executable using chmod. Verify the new version is running. ```bash chmod +x ./inspectr ``` ```bash ./inspectr --version ```