# Hosting a Plugin on a Local Server

Before you can preview a cloned plugin in FormIt, you need to host it on a local server.

### **View the Terminal in IDE**

You have the option of starting the server inside Visual Studio Code, instead of a separate terminal window. \*\*\*\* Before opening a terminal, make sure the right folder is opened in Visual Studio Code.

View > Terminal (or shortcut Ctrl + \`)

![](/files/3qz1STviQ50NYrQzgn1a)

### Set Up an HTTP Server

An HTTP server that works well is npm's [http-server](https://www.npmjs.com/package/http-server).

First, you will need to download and install [NodeJS](https://nodejs.org/en/), if it's not already installed.

If you encounter errors in the following steps, try restarting your computer to complete the NodeJS installation.

In the Command Prompt, enter the following to install npm's *http-server* globally (a one-time setup).

* `npm install http-server -g`

![](/files/TFj2Fw0seWDjnqV88B6Q)

### Start the Local Server

Once the setup is complete, run the following command in the terminal to start your npm http-server:

* `http-server`

![](/files/sVivwFYGSKQcFr5jvohv)

Tip 1: In case of any issues with running the http-server (installed globally or locally), it may be helpful to run it directly via npx:

* `npx http-server`

Tip 2: For Windows 10/11 users, if you encounter an error when running a script on your new machine, this may be due to the settings being disabled. To fix this:

* Launch PowerShell script as an administrator
* Enter: `Set-ExecutionPolicy RemoteSigned`

### Develop for FormIt Web

To develop for FormIt Web, simply run the following command instead:

* `http-server --cors`

![](/files/3Czd74lgXMvbYIsfCBe4)

### Verify Your Server

You can verify your server by navigating to the following address in your web browser:

* <http://localhost:8080>

You should see your project folder files in the browser window.

\*\*If you use a different web server than npm, the default address/port might be different.

![](/files/OaBeG4oRCMmZNLnYBUzf)


---

# 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://windows.help.formit.autodesk.com/plugins/how-to-develop-plugins/advanced-development/hosting-a-plugin-on-a-local-server.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.
