# Develop locally

## Develop JavaScript App locally

It is possible to develop your JavaScript code locally and test it in your app. To do this you need to have a development environment featuring an HTTP server.

We recommend using a build/development tool like [Vite](https://vitejs.dev/), it is an easy to use development environment for all kinds of frameworks. It offers support to easily create PWAs, and more. It is not required to use [Vite](https://vitejs.dev/), you can also use your own setup that hosts a development HTTP server.

### 1. Start your Dev Server[​](http://localhost:3000/guides/develop-js-app-locally#1-start-your-dev-server) <a href="#id-1-start-your-dev-server" id="id-1-start-your-dev-server"></a>

* **Start your development server**, for example, when using Vite run:

```
npm run dev
```

### 2. Copy the local server URL[​](http://localhost:3000/guides/develop-js-app-locally#2-copy-the-local-server-url) <a href="#id-2-copy-the-local-server-url" id="id-2-copy-the-local-server-url"></a>

* **Copy the URL** of your server. Vite uses as default: `http://localhost:3000`

![](http://localhost:3000/assets/images/local-development-terminal-start-974103c5d22d6866bf2a78620e46348b.png)

### 3. Setup your app[​](http://localhost:3000/guides/develop-js-app-locally#3-setup-your-app) <a href="#id-3-setup-your-app" id="id-3-setup-your-app"></a>

* Open your app in the designer and **open the JavaScript block**.
* **Enable Development Mode** by ticking the checkbox in the right side panel.
* Enter the **Development URL**.
* **Save** your changes.
* Click on the JavaScript block to **reload**.

![](http://localhost:3000/assets/images/local-development-setup-0f1b84c0360a291bfa1ba84244cc5186.gif)

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appmachine.com/developers/javascript/develop-locally.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
