# Publish

## Upload code

The last step, after [developing](https://dev.ubidots.com/apps/pages/development) the page code and [creating](https://dev.ubidots.com/apps/pages/api/page-creation) the entity in Ubidots, is to upload the code to the Page, in ZIP format, so it is publicly available and it can be served from Ubidots.&#x20;

Follow the below steps:

1. Compress the files from the [Development section](https://dev.ubidots.com/apps/pages/development), in ZIP format, from the root of the file structure, not the parent folder.
2. Make the below HTTP request. Be sure to replace `<page_id>`,  `<YOUR_TOKEN>` and `<path_to_zip>` as needed.

```bash
curl -X POST 'https://industrial.api.ubidots.com/api/v2.0/pages/<page_id>/code' \
-H 'X-Auth-Token: <YOUR_TOKEN>' \
-F "zipFile=@<path_to_zip>.zip;type=application/zip"
```

You should get this response:

```json
{
  "message": "File successfully uploaded."
}
```

{% hint style="warning" %}
The ZIP file is limited to a maximum of 5MB&#x20;
{% endhint %}

## Load code

Once the page is created and the code uploaded to it, it's only a matter to serving the Page from and Ubidots Dashboard. To do so:

1. Create a dashboard whose type is set to Custom<br>

   <figure><img src="https://884329393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhzNRg0B4ECiNXc093G%2Fuploads%2Fa8whxrKvZihwIDcsmIT1%2FDashboard%20type%20custom.png?alt=media&#x26;token=6e2dde45-3175-4e48-80a8-3e75c6ab9524" alt=""><figcaption></figcaption></figure>
2. In the "Custom page URL" field, enter the following URL after replacing \<page\_id> with your respective Page id\
   \
   `https://industrial.ubidots.com/app/pages/public/<page_id>`\
   \
   This URL is Ubidots format to expose your custom code through an URL that can be loaded from a Dashboard.&#x20;
