aer
Development Server

Development Server

Run a local development server with aer server to preview Lightning Web Components, explore your application architecture, test API integrations, and inspect platform events—all without deploying to an org.

Start the server

aer server force-app/main/default

The command loads Apex classes, triggers, flows, LWC, and object metadata from the specified paths. By default the server listens on http://127.0.0.1:8080.

Add --watch to automatically reload changed Apex and LWC files:

aer server force-app/main/default --watch

Press Ctrl+C to stop the server.

Local LWC preview

Open http://127.0.0.1:8080/dev/lwc in your browser to see a list of available Lightning Web Components. Click any component to render it in an isolated preview. The preview page injects mock @wire data and lets you interact with the component as if it were running in a Salesforce environment.

Combine --watch with LWC preview for a fast feedback loop:

  1. Start the server with --watch.
  2. Open a component preview in your browser.
  3. Edit the component’s HTML, JavaScript, or CSS.
  4. Save the file—the server reloads and the browser reflects changes.

LWC preview supports:

  • @api properties with editable inputs
  • @wire adapters backed by local Apex and schema
  • Component composition and slots
  • Lightning base components

The Explorer

Navigate to http://127.0.0.1:8080/dev/explorer to browse the application architecture exposed by your source paths and loaded packages. The Explorer displays:

  • Objects: Standard and custom objects with their fields, relationships, and picklist values
  • Apex Classes: Methods and signatures, call graphs showing which methods call which, interface implementations, and class inheritance hierarchies
  • Flows: Flow definitions with entry points and variables
  • Custom Metadata: Custom metadata type records
Explorer showing Apex class relationships, method calls, and interface implementations

Use the Explorer to verify that your local environment matches expectations before writing Apex tests or integration code.

API endpoints

The server exposes Salesforce-compatible REST and SOAP API endpoints. Point external tools, scripts, or integration tests at the local server instead of a Salesforce org.

Authentication

Connect to the local server using the Salesforce CLI:

$ sf org login web -r http://127.0.0.1:8080 -a aer
Successfully authorized admin@aer.local with org ID 00D000000000000

The default credentials are:

  • Username: admin@aer.local (override with --username)
  • Password: password (override with --password)

REST API examples

Create a record:

$ sf data create record -s Account -v "Name='Acme'" -o aer
Successfully created record: 001aer000000001AAA.
Creating record for Account... done

Query records:

$ sf data query -q "SELECT Id, Name FROM Account" -o aer
┌────────────────────┬──────┐
│ ID                 │ NAME │
├────────────────────┼──────┤
│ 001aer000000001AAA │ Acme │
└────────────────────┴──────┘

Total number of records retrieved: 1.
Querying Data... done

Call Apex REST:

sf apex run rest -m GET -u /services/apexrest/MyService -o aer

The server supports composite requests, batch requests, and the SObject Collections API for bulk operations.

Event Viewer

The Event Viewer at http://127.0.0.1:8080/dev/events displays platform events and deliveries during the session. Use it to verify that your code publishes events correctly and that subscribers receive them before deploying to an org.

Publishing events

Events can be published through:

  • Apex (EventBus.publish())
  • REST API
  • Pub/Sub API (gRPC)

Subscribing to events

Subscriptions are supported through:

  • Pub/Sub API (gRPC)
  • CometD Streaming API
  • Apex triggers
  • LWC Emp API

Integration testing with events

  1. Start the server and open the Event Viewer in your browser.
  2. Publish events via Apex, REST, or Pub/Sub API.
  3. Watch events and deliveries appear in real time.
# Start the server
aer server force-app/main/default &

# Authenticate
sf org login web -r http://127.0.0.1:8080 -a aer

# Publish a platform event
sf data create record -s OrderStatusChange__e -v "Status__c='Completed'" -o aer

# Verify the event was published and delivered via the Event Viewer

Tips

  • Use --sandbox to set Organization.IsSandbox to true for code that checks the environment.
  • Load managed packages with --package or --package-dir to test integrations with third-party apps.
  • Use --allow-callouts to allow the server to make real HTTP callouts.
  • Use --wiremock to mock HTTP callouts with WireMock stubs (works with or without --allow-callouts).
  • Assign permission sets to the default user with -p PermissionSetName for permission-aware testing.
© 2012–2026 October Swimmer.