Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md - Next + Turso template #44

Merged
merged 7 commits into from
Mar 25, 2024
44 changes: 20 additions & 24 deletions templates/nextjs-app-13-5-6-turso/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
# Nextjs v13.5.6 Edge Runtime
Nextjs v13.5.6 project example using edge runtime and app format.
# Next.js App + Configurations + Turso

This example contains:
* Index page;
* Edge API Route;
* Custom Route Handlers;
The **Next.js App + Configurations + Turso** template provides a quick start to build a Next.js application with custom configurations, App Router, and integration with a Turso Database.

## Settings
This repository is an example of the new GitHub repository created during the deployment. For a more detailed step-by-step to deploy this template through Azion's platform, check the [How to deploy the Next.js App + Configurations + Turso](https://www.azion.com/en/documentation/products/guides/nextjs-app-configurations-turso/) guide.

To successfully deploy this template, you must provide the information to configure your Azion application. Fields identified with an asterisk are mandatory.
This template uses Next.js version `13.5.6` and LibSQL `0.5.3`.

* **Application Name***: the name of your edge application on Azion.
* **GitHub Personal Token***: your GitHub personal token.
* While generating your GitHub personal token, grant that your scope has the permissions to authorize an OAuth app or a personal token to access to public and private repositories, including read and write access to code. You must also enable the workflow option to allow adding and updating GitHub Actions workflow files.
---

Note that permissions can be scoped either to a user or an organization or to a repository. Read the [Creating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) documentation for more information.
## Usage information

After filling out the form, click the **Next** button to start the deployment process.
To use this template, you must [sign in on Azion Cosole](https://console.azion.com/login).

Once the template is deployed, you can edit and update your args and code. However, you'll need to declare secrets on your project's GitHub repository first to complete the second build with these changes. When the second build is completed, you can manage your project with a [continuous deployment workflow](#continuous-deployment).
> If you haven't an account, go to the [signup page](https://console.azion.com/signup) to complete the registration.
For a more detailed step-by-step on declaring your secrets and using this template, check the [How to deploy edge applications with the Next.js Static Boilerplate](https://www.azion.com/en/documentation/products/guides/nextjs-static-boilerplate/) guide for more details.
To successfully deploy this template, you need to provide the information to configure your Azion application, as requested in the **Settings** tab on the template's page.

## Important
For a more detailed step-by-step on using this template and requirements, check the [How to deploy the Next.js App + Configurations + Turso](https://www.azion.com/en/documentation/products/guides/nextjs-app-configurations-turso/) guide.

To guarantee the optimal performance of this template, it's necessary to activate the following Azion product:
### Requirements

* [Edge Functions](https://www.azion.com/en/documentation/products/edge-application/edge-functions/#edge-functions-management)
- Create a [Turso account](https://accounts.turso.tech/sign-up).
- Install the [Turso CLI](https://docs.turso.tech/cli/introduction).
- Create a [database](https://docs.turso.tech/quickstart) with a table called `posts`, and the fields `id` and `message`.
- Generate your [GitHub personal token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic).
- Enable [Edge Functions and Application Accelerator](https://www.azion.com/en/documentation/products/guides/billing-and-subscriptions/) in your Azion account.

You need to activate the product separately via RTM. Review the [Azion documentation](https://www.azion.com/en/documentation/products/guides/nextjs-static-boilerplate/) to do so.

If this product is activated, the execution of this template could generate usage-related costs. Check the [pricing page](https://www.azion.com/en/pricing/) for more information.
---

## Continuous deployment

@@ -39,7 +35,7 @@ Once the template is deployed, you can edit it and update it, as well as impleme
To do so, open your repository in GitHub. Then, go to **Settings** > **Secrets and variables** > **Action** to [add your variables](https://docs.github.com/en/actions/security-guides/encrypted-secrets), following these instructions:

1. Add the Azion personal token to the *secrets*:
- Read [how to generate an Azion personal token](https://www.azion.com/en/documentation/products/accounts/personal-tokens/) in the documentation.
- Read [how to generate an Azion personal token](https://www.azion.com/en/documentation/products/guides/personal-tokens/) in the documentation.

```bash
AZION_PERSONAL_TOKEN=<value>
@@ -64,10 +60,10 @@ Now your project is ready to work with a continuous deployment workflow, updatin

## Management

Considering that this initial setup may not be optimal for your specific edge application, all settings can be customized any time you need by using [Azion Real-Time Manager (RTM)](https://manager.azion.com/).
Considering that this initial setup may not be optimal for your specific edge application, all settings can be customized any time you need by using [Azion Console)](https://console.azion.com/).

To manage and edit your edge application’s settings, read the documentation about [managing edge applications](https://www.azion.com/en/documentation/products/edge-application/first-steps/) for more details.

### Custom domain

The edge application created during the deployment has an assigned Azion domain to make it accessible through the browser. The domain has the following format: `xxxxxxxxxx.map.azionedge.net`. However, you can add a custom domain for users to access your edge application through it. Go to the [Domains](https://www.azion.com/en/documentation/products/edge-application/domains/) documentation to read more about it.
The edge application created during the deployment has an assigned Azion domain to make it accessible through the browser. The domain has the following format: `xxxxxxxxxx.map.azionedge.net`. However, you can add a custom domain for users to access your edge application through it. Go to the [Domains](https://www.azion.com/en/documentation/products/guides/configure-a-domain/) documentation to read more about it.