> For the complete documentation index, see [llms.txt](https://windows.help.formit.autodesk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://windows.help.formit.autodesk.com/it/plugins/how-to-develop-plugins/advanced-development/hosting-a-plugin-on-a-local-server.md).

# Hosting di un plug-in su un server locale

Prima di poter visualizzare l'anteprima di un plug-in clonato in FormIt, è necessario ospitarlo su un server locale.

### **Visualizzazione del terminale in IDE**

È possibile avviare il server all'interno di Visual Studio Code, anziché in una finestra di terminale separata.\*\*\*\* Prima di aprire un terminale, assicurarsi che in Visual Studio Code sia aperta la cartella corretta.

Vista > Terminale (o tasto di scelta rapida CTRL+')

![](https://github.com/FormIt3D/autodesk-formit-windows-help/blob/master-ita/.gitbook/assets/image%20\(11\)%20\(1\).png)

### Impostazione di un server HTTP

Un server HTTP che funziona correttamente è [http-server](https://www.npmjs.com/package/http-server) di npm.

Innanzitutto, è necessario scaricare e installare [NodeJS](https://nodejs.org/en/), se non è già installato.

Se si verificano errori nei seguenti passaggi, provare a riavviare il computer per completare l'installazione di NodeJS.

Alla riga di comando, immettere quanto segue per installare globalmente *http-server* di npm (un'unica installazione).

* `npm install http-server -g`

![](/files/C3oomZbyM00Kvoz9js4L)

### Avvio del server delle licenze

Al termine dell'installazione, eseguire il seguente comando nel terminale per avviare http-server di npm:

* `http-server`

![](/files/u6meRDscTteP7IiMFfHt)

Suggerimento 1 In caso di eventuali problemi con l'esecuzione di http-server (installato globalmente o localmente), potrebbe essere utile eseguirlo direttamente tramite npx:

* `npx http-server`

Suggerimento 2 Per gli utenti di Windows 10/11, se si verifica un errore durante l'esecuzione di uno script nel nuovo computer, ciò potrebbe essere dovuto al fatto che le impostazioni siano disattivate. Per risolvere questo problema:

* Avviare lo script PowerShell come amministratore.
* Immettere: `Set-ExecutionPolicy RemoteSigned`

### Sviluppo di FormIt Web

Per sviluppare per FormIt Web, è sufficiente eseguire il seguente comando:

* `http-server --cors`

![](https://github.com/FormIt3D/autodesk-formit-windows-help/blob/master-ita/.gitbook/assets/image%20\(10\)%20\(1\).png)

### Verifica del server

È possibile verificare il server accedendo al seguente indirizzo nel browser Web:

* <http://localhost:8080>

I file delle cartelle di progetto dovrebbero essere visualizzati nella finestra del browser.

\*\*Se si utilizza un server Web diverso da npm, l'indirizzo/la porta di default potrebbe essere differente.

![](/files/xraM6NDSOFFAGVgqoxeU)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://windows.help.formit.autodesk.com/it/plugins/how-to-develop-plugins/advanced-development/hosting-a-plugin-on-a-local-server.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
