Azure CosmosDB - Next.js Starter

R
Renaudil y a 2 jours
0

Description

This is a Next.js project that uses @azure/cosmos JS SDK to connect to a Azure Cosmos DB database.

npx boilerapp azure-cosmosdb-nextjs-starter

文档

Azure Cosmos DB Starter – Todo App

A simple Todo App built on Next.js and Azure Cosmos DB, deployed on Vercel with the Vercel + Azure Cosmos DB integration.

Deployment Instructions

Pre requisites

Azure Cosmos DB account, database and container. Please make sure the Partition Key for container is '/id'.

Steps

  • Install dependencies from the root folder - npm install

  • Rename sample.env to .env and set appropriate variables.

    • COSMOSDB_CONNECTION_STRING : This is the connection string for Azure Cosmos DB.
    • COSMOSDB_DATABASE_NAME : This is the name of the database to store todos.
    • COSMOSDB_CONTAINER_NAME : This is the name of the container to store todos.

You can obtain the connection string by navigating to your Azure Cosmos DB account page's key blade, and select Primary connection string. Copy the value to use.

  • Start the project - npm run dev

Demo

https://cosmosdb-vercel-starter.vercel.app/

Vercel + Azure Cosmos DB Integration

https://vercel.com/integrations/azurecosmosdb5c:T4fd,# Azure Cosmos DB Starter – Todo App

A simple Todo App built on Next.js and Azure Cosmos DB, deployed on Vercel with the Vercel + Azure Cosmos DB integration.

Deployment Instructions

Pre requisites

Azure Cosmos DB account, database and container. Please make sure the Partition Key for container is '/id'.

Steps

  • Install dependencies from the root folder - npm install

  • Rename sample.env to .env and set appropriate variables.

    • COSMOSDB_CONNECTION_STRING : This is the connection string for Azure Cosmos DB.
    • COSMOSDB_DATABASE_NAME : This is the name of the database to store todos.
    • COSMOSDB_CONTAINER_NAME : This is the name of the container to store todos.

You can obtain the connection string by navigating to your Azure Cosmos DB account page's key blade, and select Primary connection string. Copy the value to use.

  • Start the project - npm run dev

Demo

https://cosmosdb-vercel-starter.vercel.app/

Vercel + Azure Cosmos DB Integration

https://vercel.com/integrations/azurecosmosdb

Prix

Gratuit

FREE

评论 (0)

常见问题

常见问题解答 (FAQ)

有问题?我们有答案。如果您找不到想要的答案,请随时联络我们。

Boilerapp 是一个专门用于分享 Boilerplates、入门套件(Starter Kits)和项目模版的开发者社区平台。我们的目标很简单:为您节省初始配置(Setup)的时间,让您可以专注于真正重要的代码。无论您是在寻找简单的代码库还是完整的 SaaS 项目,都能在这里找到。

还有其他问题?

我们的团队随时为您提供帮助。联络我们,我们将尽快回复。