Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
update redeployment section
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian-dev28 committed Oct 31, 2023
1 parent 91f190c commit 58f42ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 43 deletions.
27 changes: 6 additions & 21 deletions dapps/dapp-challenges/challenge-0-crowdfund.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -203,37 +203,22 @@ You should see an updated balance reflecting the amount you have pledged in the

## Checkpoint 4: 🚢 Ship it! 🚁

Now that your dapp is fully functional, next prepare it for a new deployment on Futurenet, this time with a hosted frontend.
Now that your dapp is fully functional, its time to prepare it for a new deployment on Futurenet, this time with a hosted frontend.
This section requires that you have a [Vercel account] and the Vercel cli installed.

Then, run the following commands to initialize the contracts on Futurenet:

```sh
npm run reset
```

Then run the dev server again:

```sh
npm run dev
```

Now, open your browser and visit [http://localhost:3000](http://localhost:3000).

Ensure that you are connected to Futurenet and you should be able to see the frontend of your dapp!

Next, you will need to remove unneccessary files for the the deployment. Run the following command to remove the `target` directory:
You will need to remove unneccessary files to save space for the the deployment. Run the following command to remove the `target` directory:

```sh
rm -rf target
```

Next, you will use the Vercel cli to complete our deployment.
>Note: You can build this directory again by running `soroban contract build`
> Note: If you don’t already have a [Vercel account], you will need to create one and link it to your GitHub account.
Next, you will use the Vercel cli to complete your deployment.

[Vercel account]: https://vercel.com/login

First install the Vercel cli:
If you don't have the Vercel cli installed, run the following command to install it:

```sh
npm i --global vercel
Expand Down
24 changes: 2 additions & 22 deletions dapps/dapp-challenges/challenge-2-liquidity-pool.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -281,29 +281,9 @@ Once the transaction is confirmed, you should see updated balances on the fronte

## Checkpoint 4: 🚢 Ship It! 🚁

Now that your dapp is fully functional , it's time to prepare it for new deployment on Futurenet using Vercel.
Navigate to the `frontend` directory and run the development server:

First, run the following commands to initialize the contracts on Futurenet:

```bash
rm -rf .soroban
./initialize.sh futurenet
```

> Note: This will remove the existing contracts and initialize new ones on Futurenet.
Then, navigate to the `frontend` directory and run the development server:

```bash
cd frontend
make setup && make start_dev
```

Now, open your browser and visit [http://localhost:5173](http://localhost:5173/).

Ensure that Freighter is connected to Futurenet, and you should be able to see the frontend of your dapp!

Next, you will remove the target directory, as it is not used by Vercel to deploy your site. To do this, navigate to the `liquidity-pool` directory and run the following:
First, you will remove the target directory, as it is not used by Vercel to deploy your site. To do this, navigate to the `liquidity-pool` directory and run the following:

```
rm -rf target
Expand Down

0 comments on commit 58f42ee

Please sign in to comment.