---
schema_version: "1"
id: 254b6cd241f6cb50d3b3662daf2b0fb503cb0af4055913457e39321a095846b4
title: Start an App from a Browser Example
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/http-connector/latest/http-start-app-brows-task.md
canonical_url: https://docs.mulesoft.com/http-connector/latest/http-start-app-brows-task
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 0fc6e3ef49a6ebe75d459c6b500d14b660a1e6943d15340e180c54dbb268e577
description: MuleSoft Documentation Site
release: "1.12"
latest: true
---
---
product: HTTP Connector
version: 1.12
is-latest-version: true
---

# Start an App from a Browser Example

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

The following example illustrates how to configure the Anypoint Connector for HTTP (HTTP Connector)
**Listener** source to initiate a flow. In this example, the HTTP **Listener** source listens on a
specific port for every network interface on the server. Then, the **Logger** component logs the
message `Hello`. To accomplish this example, you must create the Mule app, configure an HTTP global
element, run, and test the app with curl commands.

The following screenshot shows the Anypoint Studio app flow for this example:

![Start app from a browser flow](/mulesoft/current/en-us/http-connector/latest/_images/http-startapp-flow.png)

## Create the Mule Application

To create the Mule flow:

1.  In the **Mule Palette** view, select the HTTP **Listener** source and drag it on to the
    canvas.  
    The source initiates the flow by listening for incoming HTTP message attributes.

2.  On the **Listener** configuration screen, optionally change the value of the **Display Name**
    field.

3.  Set the **Path** field to `/trigger` to start the app from the web browser.

4.  Click the plus sign (**+**) next to the **Connector configuration** field to configure a global
    element that can be used by all instances of the HTTP **Listener** in the app.

5.  On the **General** tab, configure the following fields:

    - **Host**  
      `All Interfaces [0.0.0.0] (default)`

    - **Port**  
      `8081`

6.  Click **OK**.

    ![HTTP Listener global configuration](/mulesoft/current/en-us/http-connector/latest/_images/http-startapp-example-1.png)

    ![HTTP Listener configuration](/mulesoft/current/en-us/http-connector/latest/_images/http-startapp-example-2.png)

7.  Drag a **Logger** component to the right of HTTP **Listener**.

8.  In the **Logger** configuration screen, set the **Message** field to `Hello`.

    ![Logger configuration](/mulesoft/current/en-us/http-connector/latest/_images/http-startapp-example-3.png)

9.  Save your Mule app.

10. Click the project name in **Package Explorer** and then click **Run** > **Run As** > **Mule
    Application**.  
    Ensure that the console messages state that the application started correctly by looking at the
    message `Mule is up and kicking`.

11. Open a browser and type `http://0.0.0.0:8081/trigger`.  
    The HTTP **Listener** source listens to the request on port `8081`, and the app starts.

12. In the Studio Console, scroll through the logs to see the `Hello` message, for example:

```console
INFO  2020-01-02 13:00:00,438 [[MuleRuntime].cpuLight.15: [http].httpFlow.CPU_LITE @169a1097]
  [event: id] org.mule.runtime.core.internal.processor.LoggerMessageProcessor: Hello
```

## XML for Starting an App from a Browser

Paste this code into your Studio XML editor to quickly load the flow for this example into your Mule
app:

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
	<http:listener-config name="HTTP_Listener_config" >
		<http:listener-connection host="0.0.0.0" port="8081" />
	</http:listener-config>
	<flow name="flow" >
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/trigger"/>
		<logger level="INFO" doc:name="Logger" message="Hello"/>
	</flow>
</mule>
```

## See Also

- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)

- [Salesforce Help](https://help.salesforce.com)
