An open API service indexing awesome lists of open source software.

https://github.com/cockroachdb/cockroachdb-typescript

A modern cloud-native web app using TypeScript, React, Prisma, Netlify serverless functions, and CockroachDB
https://github.com/cockroachdb/cockroachdb-typescript

cloud-native cockroachdb netlify prisma react typescript

Last synced: 6 months ago
JSON representation

A modern cloud-native web app using TypeScript, React, Prisma, Netlify serverless functions, and CockroachDB

Awesome Lists containing this project

README

          

# Using CockroachDB with a React + Netlify App

This project was bootstrapped with Create React App. It is a simple game leaderboard that displays a list of player scores and contains an admin component that lets you add new leaderboard entries. The corresponding blog post is available via [https://www.cockroachlabs.com/blog/react-typescript-cockroachdb-sample-app/](https://www.cockroachlabs.com/blog/react-typescript-cockroachdb-sample-app/)

It uses the Prisma ORM along with Netlify Functions and CockroachDB Serverless to read and write data.

To run the app, clone or fork it into your own GitHub repo, use the repo to create a new Netlify app, and set the DATABASE_URL environment variable in Netlify to a Postgres connection string that Prisma will recognize. Then, deploy to Netlify or run locally using with the Netlify CLI by running netlify link to connect the local netlify environment to your app on Netlify, then run netlify dev.