Testing different free serverless database providers with a small todo-list implementation: free-databases.vercel.app
Run yarn install
, then yarn dev
.
To make the different databases work locally, you will need to create accounts
with the third parties and add your credentials in your .env
.
You will also need to create the todos table:
-- PostgreSQL table for most providers
CREATE TABLE IF NOT EXISTS "todos" (
"id" text PRIMARY KEY NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
"name" text NOT NULL,
"done" boolean NOT NULL
);
-- MySQL table for PlanetScale
CREATE TABLE `Todo` (
`id` varchar(191) NOT NULL,
`createdAt` datetime(3) NOT NULL DEFAULT current_timestamp(3),
`updatedAt` datetime(3) NOT NULL,
`name` text NOT NULL,
`done` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `Todo_id_key` (`id`)
) ENGINE InnoDB,
CHARSET utf8mb4,
COLLATE utf8mb4_unicode_ci;
yarn test
yarn e2e
NODE_TLS_REJECT_UNAUTHORIZED=0
, which is probably not something that you should do in
production.export const dynamic = '...'
or export const fetchCache = '...'
. It forced me to copy some folders (convex
, cookie
, deta
), it would be nice
if this could be avoided.