Testing different free serverless database providers with a small todo-list implementation: free-databases.vercel.app
- Aiven
Bit.io- CockroachDB
- Convex
- CosmosDB
- Deta
- ElephantSQL
- FaunaDB
- Firebase
- Fly.io
- Koyeb
- MongoDB Atlas
- Neon
PlanetScale- PocketHost
Railway- Supabase
- Tembo
- TiDB Cloud
- Turso
- Upstash
- Vercel Postgres
- Xata
- Yugabyte
- Cookies as a data store (no third party)
- Please open a PR or an issue to suggest more!
- Bit.io is discontinued
- CosmosDB stopped working after 2 weeks
- ElephantSQL will be discontinued in 2025
- Railway required an update from me (which I might do later)
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;- Unit tests:
yarn test - Cypress tests:
yarn e2e
- All the providers for providing free tiers
- Vercel too, also for the generous free tier
- Took a shortcut and set
NODE_TLS_REJECT_UNAUTHORIZED=0, which is probably not something that you should do in production. For Fly.io, I am allocating to database to an IPv4 address, which costs $2/month. I could not find a way to use the free IPv6 address with NextJS+Vercel.Fly.io never charged me, so I guess it's free.- Using Next.js app directory, I couldn't find a way to nicely define special
export const dynamic = '...'orexport const fetchCache = '...'. It forced me to copy some folders (convex,cookie,deta), it would be nice if this could be avoided. - Databases descriptions are taken from any place I could find them or AI-generated, they might not be very accurate.
- Add this into 🕶️ Awesome or somewhere