> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dscloud.pt/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy e commit com JavaScript

> Crie uma aplicação com ZIP ou atualize uma aplicação existente com o SDK.

Prepare o [ZIP](https://docs.dscloud.pt/getstarted/deploy-zip.md) e reutilize o [cliente autenticado](https://docs.dscloud.pt/sdkjs-reference/client.md).

> [tab] Criar aplicação
>
> ```javascript Upload theme={null}
> const app = await api.apps.upload("./projeto.zip");
> console.log(app.id);
> ```

> [tab] Atualizar aplicação
>
> ```javascript Commit theme={null}
> const app = await api.apps.get(process.env.DSCLOUD_APP_ID);
> await app.commit("./projeto.zip");
> await app.restart();
> ```
>
> O segundo comando solicita o reinício após a atualização. Confira o estado e os logs para verificar o resultado.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.