Skip to content

⚡️ A sample Next.js + DataStax Astra starter app that leverages the AstraDB REST API to manage a character database.

License

Notifications You must be signed in to change notification settings

DataStax-Examples/astra-next.js-starter

Repository files navigation

Next.js and Astra DB Starter

10 minutes, Beginner, Start Building

A sample Next.js + DataStax Astra DB starter app that integrates Astra DB into a Next.js API.

image

Quick Start

  • Create an Astra DB Keyspace called sag_nextjs_starter in your database.
  • Generate an Application Token with the role of Database Administrator for the Organization that your Astra DB is in.
  • Click the 'Open in Gitpod' link: Open in IDE
  • Once the app is finished launching in the Gitpod IDE, copy the env.example file to a file named .env and fill the required values in from your Application Token and Astra DB connection settings.
  • Start the example by running npm run dev in the Gitpod console.

Objectives

  • Provide a Next.js starter using Astra DB as the storage backend

How this works

Once the Astra DB credentials are provided, the Next.js endpoint will fetch your Astra DB keyspaces. The webservice will be available on port 3000 once the application has been deployed. Once the application is running, you can begin to make changes to your app by editing pages/index.js.

Next.js is an open-source JavaScript framework that lets you build server-side rendering and static web applications using React. It is not nescessary to configuration of webpack or similar to start using Next.js, as it comes with its configuration. This make it very simple to start a project, as we only need to execute simple commands and the project is ready.

Vercel is a cloud platform for static sites and Serverless Functions, it enables developers to host Jamstack websites and web services that deploy instantly. You also have the option to deloy this app in Vercel.

About

⚡️ A sample Next.js + DataStax Astra starter app that leverages the AstraDB REST API to manage a character database.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published