Skip to content

Commit

Permalink
Merge branch 'v3-hello-world' of github.com:iExecBlockchainComputing/…
Browse files Browse the repository at this point in the history
…documentation-tools into v3-hello-world
  • Loading branch information
akugone committed Jan 10, 2025
2 parents 59573a4 + 67e7684 commit 4af2d31
Showing 1 changed file with 0 additions and 116 deletions.
116 changes: 0 additions & 116 deletions overview/helloWorld/3-buildIApp.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<<<<<<< HEAD
# 🛠️ Build your IApp
=======
# Build iApp
>>>>>>> 67e7684e2ead2542813d02c1dd9f0223c9fb519a

> Reading 🕒 10 mins
Expand All @@ -11,11 +7,7 @@ App**, an application that will run in a trusted execution environment (TEE) and
process protected data.

This guide will help you set up, test, deploy and run your iExec App using the
<<<<<<< HEAD
[`idapp-cli`](https://github.com/iExecBlockchainComputing/idapp/blob/main/cli/README.md)
=======
[`iapp-cli`](https://github.com/iExecBlockchainComputing/iapp/tree/main/cli)
>>>>>>> 67e7684e2ead2542813d02c1dd9f0223c9fb519a
tool. Follow the instructions carefully for a smooth development experience.

## Prerequisites
Expand All @@ -38,7 +30,6 @@ And also:

- A [**DockerHub**](https://docs.docker.com/engine/install/) account
- **A private key** from an Ethereum wallet (e.g., MetaMask, we need it to run
<<<<<<< HEAD
the `idapp run` command)

## Installation
Expand All @@ -48,22 +39,10 @@ the following command:

```sh
npm install -g idapp-cli
=======
the `iapp run` command)

## Installation

First, you need to install the `iapp-cli` package. Open your terminal and run
the following command:

```sh
npm install -g iapp-cli
>>>>>>> 67e7684e2ead2542813d02c1dd9f0223c9fb519a
```

## Initialize Framework

<<<<<<< HEAD
To initialize the working directory for developing your iDapp, use the
`idapp init` command. This command sets up the necessary project structure and
files.
Expand All @@ -72,21 +51,10 @@ files.
mkdir demo
cd demo
idapp init
=======
To initialize the working directory for developing your iApp, use the
`iapp init` command. This command sets up the necessary project structure and
files.
```sh
mkdir iexec-test
cd iexec-test
iapp init
>>>>>>> 67e7684e2ead2542813d02c1dd9f0223c9fb519a
```

You will be prompted with the following message:

<<<<<<< HEAD
```
___ ____ _ ____ ____
|_ _| _ \ / \ | _ \| _ \
Expand All @@ -98,37 +66,19 @@ You will be prompted with the following message:
? What is the name of your project? develop-my-idapp
? Which language do you want to use to build your iDapp? JavaScript
? Would you like to access a protected data inside your iDapp? (Y/n)
=======
```sh
___ _ ____ ____
|_ _| / \ | _ \| _ \
| | / _ \ | |_) | |_) |
| | / ___ \| __/| __/
|___/_/ \_\_| |_|
✔ What's your project name? (A folder with this name will be created) ...
? What kind of project do you want to init?
> Hello World - iapp quick start
Advanced
>>>>>>> 67e7684e2ead2542813d02c1dd9f0223c9fb519a
```

::: tip

<<<<<<< HEAD
Answer `no` to the last question
`? Would you like to access protected data inside your iDapp?`. We will cover
integrating protected data into your iDapp later.
=======
We recommend selecting "Hello World" to quickly discover how iApp works
>>>>>>> 67e7684e2ead2542813d02c1dd9f0223c9fb519a

:::

A new folder was created, it contains a very simple Node.js application, with
the main code being located in `app.js`.

<<<<<<< HEAD
## Test Your iDapp

To test your iDapp, use the `idapp test` command. This command will invoke your
Expand Down Expand Up @@ -182,78 +132,12 @@ forget to save it for the next chapter. ![alt text](/assets/hello-world/app.png)

:::

=======
## Test Your iApp

To test your iApp, use the `iapp test` command. This command will invoke your
locally installed Node.js and run the `app.js` file.

### Using Arguments

You can pass arguments to your iApp using the `--args` option. This allows you
to provide necessary inputs during runtime.

```sh
iapp test --args your-name
```

### Using Protected Data

If your iApp requires protected data, you can use the `--protectedData` option
to specify the data to be used.

```sh
iapp test --protectedData default
```

## Deploy Your iApp

Deploy your iApp on the iExec protocol. You need to have your Docker daemon
running to build the Docker image.

Before deploying, you need to create a personal access token on Docker Hub:

1. Go to your Docker Hub account:
[Docker Hub Security Settings](https://hub.docker.com/settings/security)
2. Click on "Personal access tokens"
3. Click on "Generate new token"
4. Name it for instance "Test iExec iApp CLI"
5. Select "Read & Write" access permissions
6. Don't forget to save your personal access token

Once you have your token, you can deploy your iApp using the following command:

```sh
iapp deploy
```

::: tip iExec App Address

At the end of this command, you will have the **iExec App address**, don't
forget to save it.

:::

## Run Your iApp

Now you can run your application using:

```sh
iapp run <my-iapp-address>
```

>>>>>>> 67e7684e2ead2542813d02c1dd9f0223c9fb519a
## 🧩 Key takeaways

- An **iExec App** is an application that can run in a trusted execution
environment (TEE) and process protected data.
<<<<<<< HEAD
- The **iDapp CLI** is a command-line tool that helps you build, test, and
deploy your iExec App.
=======
- The **iApp CLI** is a command-line tool that helps you build, test, and deploy
your iExec App.
>>>>>>> 67e7684e2ead2542813d02c1dd9f0223c9fb519a
- **Protected Data** can be integrated into your iExec App to process private
data.
- **iExec Apps** can be deployed on the iExec protocol to run in a trusted
Expand Down

0 comments on commit 4af2d31

Please sign in to comment.