Skip to content

Commit

Permalink
docs: deploy update + minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
smarroufin committed Feb 22, 2024
1 parent 73f6dff commit 399b3f7
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/content/1.getting-started/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Introduction
description: Welcome to NuxtHub documentation.
---

NuxtHub is a Nuxt Toolkit to create full-stack applications on the Edge. It is powered by Cloudflare Pages and leverages many Cloudflare features like KV, D1 and R2 to allow a complete backend experience.
NuxtHub is a Nuxt Toolkit to create full-stack applications on the Edge. It is powered by Cloudflare Pages and leverages many Cloudflare features such as KV, D1, and R2, offering a complete backend experience.

## Features

Expand Down
2 changes: 1 addition & 1 deletion docs/content/1.getting-started/2.installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Installation
description: How to use NuxtHub in a project.
---

Begin your journey with NuxtHub using this step-by-step tutorial, designed for developers seeking an all-in-one platform to create and deploy web applications.
Begin your journey with NuxtHub using this step-by-step tutorial, designed for developers seeking an all-in-one platform to create and deploy web applications on the Edge.

## Setup

Expand Down
58 changes: 37 additions & 21 deletions docs/content/1.getting-started/3.deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,69 @@ description: How to deploy your project with NuxtHub.

To deploy your Nuxt application on the Edge, we use Cloudflare Pages. Therefore, we require you to create a [Cloudflare](https://www.cloudflare.com/){target=_blank} account.

Then two options are offered to you:
Then, two options are offered to you:

## Using hub.nuxt.com

The [NuxtHub admin](https://hub.nuxt.com){target=_blank} is designed to simplify your experience with the NuxtHub module, enabling you to effortlessly manage teams and projects, as well as deploy in seconds combined with the NuxtHub CLI.

### Setup your team
### Create your team

First, you need to connect to [NuxtHub admin](https://hub.nuxt.com){target=_blank}. A default team is automatically created for you and you will be able to update it in the settings.
First, you need to connect to [NuxtHub admin](https://hub.nuxt.com){target=_blank}. A default team is automatically created for you, and you will be able to update it in the settings.

Next, you are invited to setup your team with Cloudflare, meaning you need to link it to your Cloudflare account. Follow the instructions by creating an access token on Cloudflare, then linking it to the team in the admin.
Next, you are invited to setup your team with Cloudflare, which involves linking it to your Cloudflare account. Follow the instructions by creating an access token on Cloudflare, and then linking it to the team in the admin.

Done? Now your team is connected to Cloudflare.

### Setup your project
### Create your project

From here, you can either create your project in the admin or with the CLI.
From here, you can either create your project in the admin or with the CLI. But in both cases, you will need to use the CLI to deploy your project, so let's install it together.

#### Admin
Install NuxtHub CLI with any binaries manager (we recommand Volta.sh):

::callout
Documentation coming soon.
::
```bash
volta install nuxthub
```

<!-- TODO -->
Then you can already connect it to NuxtHub with:

```bash
nuxthub login
```

#### CLI
It opens a browser window to connect to your NuxtHub account. Once done, you can close the browser window. Now we can create a new project.

Then, install NuxtHub CLI with any binaries manager (we recommand Volta.sh):
#### In the Admin

Jump to the "Projects" section of your team, and click "New project". A project name is required. Then, NuxtHub creates a new Cloudflare Pages for you, alongside a D1 for your database, a KV for your key-values and a R2 to upload files.

Then, you can link your local project with the NuxtHub project. Execute this following command from the root of your project:

```bash
volta install nuxthub
nuxthub link
```

It should list your teams, select the one you want, then it lists the projects, select the one you just created. Now your local project is linked to the NuxtHub project.

#### With the CLI

You can simply run the following command from the root of your project, which will eventually offer you to create a new project, enter the name and it will be created and linked for you.

```bash
nuxthub link
```

Then open a terminal in at the root of your project and run:
### Deploy your project

```bash
nuxthub deploy
```

This command will:
This command:

1. Ask you to connect to hub.nuxt.com, if not already logged in
2. Link your local project with a NuxtHub project, if not already linked
- Select a team
- Select or create a project
3.
1. Asks you to connect to hub.nuxt.com, if not already logged in
2. Links your local project with a NuxtHub project, if not already linked
3. Deploys your project to Cloudflare Pages

::callout
Documentation coming soon.
Expand Down

0 comments on commit 399b3f7

Please sign in to comment.