# 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 + \`)

![](https://193854745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVWdttpiARClwDWoDArlA%2Fuploads%2Fgit-blob-70728aa5230058bbc0853af7597d5633c8482daa%2Fimage.png?alt=media)

### 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`

![](https://193854745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVWdttpiARClwDWoDArlA%2Fuploads%2Fgit-blob-aa9245c0718bb2a1b84597879f87b1db1944e0a5%2Fimage.png?alt=media)

### Start the Local Server

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

* `http-server`

![](https://193854745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVWdttpiARClwDWoDArlA%2Fuploads%2Fgit-blob-2c233a5985b71b0451ef3a5a68083c76b879a87d%2Fimage.png?alt=media)

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`

![](https://193854745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVWdttpiARClwDWoDArlA%2Fuploads%2Fgit-blob-1d46258711cea48d71a7b31beb20b2fac11b3dbf%2Fimage.png?alt=media)

### 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.

![](https://193854745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVWdttpiARClwDWoDArlA%2Fuploads%2Fgit-blob-fed5b683fc91a4717930e195a3b740f87ddd655f%2Fimage.png?alt=media)
