Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 10 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,20 @@ To deploy this project on Vercel, you will need:

### Steps

1. Click Deploy:
- Click [Deploy](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcouchbase-examples%2Fnextjs-quickstart&project-name=couchbase-nextjs-quickstart&repository-name=couchbase-nextjs-quickstart&developer-id=oac_5eS7l7O4wvTE47rCKEYSFLQT&integration-ids=oac_5eS7l7O4wvTE47rCKEYSFLQT)

&nbsp; &nbsp; &nbsp; &nbsp; <a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcouchbase-examples%2Fnextjs-quickstart&project-name=couchbase-nextjs-quickstart&repository-name=couchbase-nextjs-quickstart&developer-id=oac_5eS7l7O4wvTE47rCKEYSFLQT&integration-ids=oac_5eS7l7O4wvTE47rCKEYSFLQT"><img src="https://vercel.com/button" alt="Deploy with Vercel" width="140px"/></a>
<a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcouchbase-examples%2Fnextjs-quickstart&project-name=couchbase-nextjs-quickstart&repository-name=couchbase-nextjs-quickstart&developer-id=oac_5eS7l7O4wvTE47rCKEYSFLQT&integration-ids=oac_5eS7l7O4wvTE47rCKEYSFLQT"><img src="https://vercel.com/button" alt="Deploy with Vercel" width="140px"/></a>

2. Follow the steps when prompted. The integration step will open the Couchbase Capella UI and allow you to select resources to connect.
- If you sign-up for a new Capella account, you may have to re-deploy the application once the database has finished provisioning. Read more in #2 of the [Pitfalls and FAQ section](#common-pitfalls-and-faqs) below.
3. Explore the newly deployed application: create, update, and delete some user profiles. A few sample profiles will be added automatically, and you can load the sample data manually by following [these instructions](#sample-data).
- Follow the steps when prompted. The integration step will open the Couchbase Capella UI and allow you to select resources to connect.
- Explore the newly deployed application: create, update, and delete some user profiles. A few sample profiles will be added automatically, and you can load the sample data manually by following [these instructions](#sample-data).

### Common Pitfalls and FAQs

1. **Deployment Failed**

- This usually occurs when the environment variables are missing or not yet set (such as when waiting for a new database to be provisioned). Inspect the build logs for more information, and ensure the environment variables have been set.
- When **deploying a new trial database**, you'll need to wait until the environment variables are set in your Vercel console, and re-deploy to pick up the new values.
- **Note:** A re-deploy is _required_ after any changes to the environment variables, as this is the only way to apply the changes. **This can be done from the "deployments" tab on the project's dashboard (click the three dots on the row for your failed deployment and click "redeploy").**

2. **Integrated with a new trial database**

- If you've deployed this template with a trial database, note that the `profile` collection will be created as a part of the `travel-sample` bucket during the initial build.
- Be sure to re-deploy after updating the environment variables if the initial build fails.
- This is related to the previous, and issues will manifest as deployment failures.

3. **Infinite Loading State OR `Query failed: parsing error` OR `Query failed: bucket not found`**

- No data received from the database. Be sure you are using the right bucket in your `CB_BUCKET` environment variable, a `_default`scope, and a collection named`profile`.

4. **504 Gateway Timeout after deploying**

- This error usually occurs when the application cannot reach the database. Ensure that the environment variables are correct, IP addresses are allowed, and the Database User credentials match those in the environment variables.
- **Infinite Loading State OR `Query failed: bucket not found` OR `Query failed: parsing error`**
- No data received from the database. Be sure you are using the right bucket in your `CB_BUCKET` environment variable, a `_default` scope, and a collection named `profile`.
- **504 Gateway Timeout after deploying**
- This error usually occurs when the application cannot reach the database. Ensure that the environment variables are correct, IP addresses are allowed, and the Database User credentials match those in the environment variables.
- Check to ensure your Database wasn't deleted.

## Run the Code Locally

Expand Down Expand Up @@ -137,6 +122,6 @@ and then using the `npm test` command.

## Try it in Your Browser

#### Run with GitPod
#### Run with [GitPod](https://gitpod.io/#https://github.com/couchbase-examples/nextjs-quickstart)

[![Try it now!](https://da-demo-images.s3.amazonaws.com/runItNow_outline.png?couchbase-example=nextjs-quickstart-repo&source=github)](https://gitpod.io/#https://github.com/couchbase-examples/nextjs-quickstart)