> For the complete documentation index, see [llms.txt](https://docs.zep.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zep.us/zep-script/zep-script-guide/zep-script-development-guide/javascript-development-tips.md).

# JavaScript Development Tips

By using the **zep-script-SDK** library, you can keep your folder structure neat and make the project compression process simpler than before. Let’s take a look at how to use the **zep-script-SDK**.

<div align="left"><figure><img src="https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2FIHG9pb6NDISxvGO3ioQ3%2Fimage.png?alt=media&amp;token=19640407-879f-414b-a748-a3d67117c2e7" alt=""><figcaption></figcaption></figure></div>

### 1. Install **node.js**

{% hint style="info" %}
Visit <https://nodejs.org/en/> to download and install node.js.

We recommend installing the LTS version, which is the most stable version.
{% endhint %}

<div align="left"><figure><img src="https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2FXgsaKIi5MTnJpONOkTQ2%2FUntitled%202.png?alt=media&amp;token=4fa29b68-8a59-4a87-9737-83f2fd169cfe" alt=""><figcaption></figcaption></figure></div>

### 2. Organize Project Folders

To use the library, the project folder should be organized as follows:

The **res** folder is where you put the images, sounds, and html files to be used in the app.

→ The folder name must be **res**.

<div align="left"><figure><img src="https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2F3QN7WYPsLri0KJWP3J4t%2Ffolder0.png?alt=media&amp;token=8e1eab62-eb8b-489a-900c-0def7e9af8d0" alt=""><figcaption></figcaption></figure></div>

### 3. Create a Project as a Zip File Using the CLI

Now when you deploy your app, you can use the CLI to create a project as a zip file with a command.

The CLI can be run from the terminal for MacOS, Windows PowerShell in windows, or the terminal environment provided since Windows 11.

> **Running PowerShell on Windows**
>
> **Shift + right-click** in the empty space of the folder in which main.js is located.
>
> Choose **`Open PowerShell window here`** or **`Open command window here`**.
>
> ![](https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2FLmnxcscbxpxsdW7Ecl2m%2FUntitled%203.png?alt=media\&token=77ca4a70-a299-454f-8ed1-1c65e482d384)
>
> A **Windows PowerShell** or **Command Prompt** window will launch as follows:
>
> ![](https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2FJNyBd1jXZY4lPUOmrNXb%2Fimage_\(3\).png?alt=media\&token=d466d969-d590-4649-8a50-5935de220fcd)

Open a command window in the folder where the **main.js** file is located and enter the following command to create a compressed file.

```powershell
npx zep-script archive
```

<div align="left"><figure><img src="https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2FCghtqcN8ZAr6KPjxAgmi%2FUntitled%204.png?alt=media&amp;token=32394f2b-3dac-457d-8089-c43eb9814be0" alt=""><figcaption></figcaption></figure></div>

If the compression process was successful, you can check that a compressed file has been created in the folder as follows:

<div align="left"><figure><img src="https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2FjtIXKBpm27Trm5SV0GFc%2Ffolder.png?alt=media&amp;token=c113ae99-3747-48aa-b6c9-d9652e8748b3" alt=""><figcaption></figcaption></figure></div>

Finally, after creating the zip file, you’re ready to deploy your app.

### 4. Deploy a Project

**1.** **Deploy on a website**

You can deploy your app by uploading the zip file created above.

Refer to the [ZEP Script Deployment Guide](/zep-script/zep-script-guide/zep-script-development-guide/zep-script-deployment-guide.md) and distribute your app!

**2. Deploy using CLI**

You can deploy the zip file created by using CLI.

Create a `zep-script.json` file as below and set the app to upload. (Make sure not to change the file name.)

<figure><img src="https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2FynmtsZfzmPacjuxI7DUm%2Fimage.png?alt=media&amp;token=e4a18e75-4ad1-46a2-83e5-957315916ecd" alt=""><figcaption></figcaption></figure>

```json
{
    "appId": "Zjkgoj",  // app ID
    "name": "Template", // app name
    "description": "Template application" , // app description
    "type": "normal" // app type ( "normal" or "minigame" or "sidebar" )
}
```

⭐ appID: Enter the ID of the app to upload.

* To change an existing app, access <https://zep.us/me/apps/>, select an app to upload, and then enter the text appended to apps/ in the address bar. (E.g., "Zjkgoj" for the reference image below)

<figure><img src="https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2FdyCpGG7J1JLYdh4A2FJC%2Fimage.png?alt=media&amp;token=1c722c35-411f-4d34-a1f4-55032125971c" alt=""><figcaption></figcaption></figure>

Open a command window in the folder where the **main.js** file is located and enter the following command to create a compressed file.

```powershell
npx zep-script publish
```

Account verification is required during the app upload process.

When the email input section appears below, enter the email address of the account that owns the app to be deployed.

<figure><img src="https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2FLiheAgh6269EtS9akSqW%2Fimage.png?alt=media&amp;token=9b489fda-3583-4857-9ddb-9ced3f15cd62" alt=""><figcaption></figcaption></figure>

When you see the message saying, **Sending login code to your email**, go to the mailbox of the email you entered above. Check the verification code and enter it to the command window to start deploying.

<figure><img src="https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2Fy5HDfmXKzfonnV4TnLgP%2Fimage.png?alt=media&amp;token=c123907c-b249-42da-9071-e6b5b66bb1ba" alt=""><figcaption></figcaption></figure>

The deploy process is complete when a green checkmark appears on the left of **Publishing…** as shown below.

<figure><img src="https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2Fww0URcQaCdOkG2MCUKP5%2Fimage.png?alt=media&amp;token=23e584c0-5a8d-4ff2-8519-f4bc4eadfe76" alt=""><figcaption></figcaption></figure>

You can see your app has been deployed in the [**My Apps**](https://zep.us/me/apps) page as described above in the **zep-script.json** file.

<figure><img src="https://3059601135-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkvEvcz_LX5eDyvl13E%2Fuploads%2FcEQHJmRvILzFcyybw22r%2Fimage.png?alt=media&amp;token=b899ceb6-3843-4f68-bb7d-397f8b3c99f3" alt=""><figcaption></figcaption></figure>

For more information about the library, please refer to the contents of the GitHub repository below.\
[ zep-script-sdk/packages/zep-script-cli at main · zep-us/zep-script-sdk](https://github.com/zep-us/zep-script-sdk/tree/main/packages/zep-script-cli)
