---
title: "Using Supabase in Replit"
description: "Supabase can serve as a hosted Postgres database for Node.js repls on Replit, queried directly through supabase-js."
url: "https://swe.quest/articles/using-supabase-in-replit-72c3911510319276"
canonical: "https://supabase.com/blog/using-supabase-replit"
source: "Supabase"
published: "2021-03-11"
difficulty: "medium"
kind: "How-to"
reading_minutes: 3
tags: ["javascript","databases","postgres"]
---

# Using Supabase in Replit

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2021-03-11, 3 min read, How-to. Original: [https://supabase.com/blog/using-supabase-replit](https://supabase.com/blog/using-supabase-replit)

## Summary

Supabase can serve as a hosted Postgres database for Node.js repls on Replit, queried directly through supabase-js. The setup is short: create a Node.js repl, require createClient, plug in the project URL and anon key from Settings \> API, and load the Countries sample dataset from the SQL tab. Example queries use both .then() and async/await syntax, along with filter methods such as or, is, in and neq, and practice challenges for learning the query interface.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)

## Prerequisites

- JavaScript basics ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- Node.js ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))

## Keywords

Supabase, Replit, supabase-js, Node.js

## Related posts

- [NoSQL Postgres: Add MongoDB compatibility to your Supabase projects with FerretDB](https://swe.quest/articles/nosql-postgres-add-mongodb-compatibility-to-your-supabase-projects-with-ferretdb-44595afd7e1b96f1.md): Supabase · 2024-01-31 · Medium · 4 min read · PostgreSQL, Databases, Containers
  FerretDB, an open source MongoDB-compatible proxy, can run on top of a Supabase Postgres database, storing each collection as a table in a \`ferretdb\` schema with documents as JSONB rows.
- [Cal.com launches Expert Marketplace built with Next.js and Supabase.](https://swe.quest/articles/cal-com-launches-expert-marketplace-built-with-next-js-and-supabase-2659e9baa272f3f6.md): Supabase · 2024-06-18 · Medium · 5 min read · PostgreSQL, Frontend, Serverless, Storage systems
  Cal.com's open-source Platform Starter Kit for building expert marketplaces runs on Next.js and Supabase, having switched from SQLite to Postgres via Prisma shortly before launch once file storage was needed.
- [supabase-js v2](https://swe.quest/articles/supabase-js-v2-f87cba2e3b41f9e9.md): Supabase · 2022-08-16 · Medium · 5 min read · JavaScript, TypeScript, API design, Identity & auth, PostgreSQL
  supabase-js v2 brings incremental quality-of-life changes over v1.
- [Supabase Local Dev: migrations, branching, and observability](https://swe.quest/articles/supabase-local-dev-migrations-branching-and-observability-770def662fe57683.md): Supabase · 2023-08-08 · Easy · 6 min read · PostgreSQL, Developer tools, Schema migrations, Testing, Deployment
  Supabase's CLI gains a batch of Postgres local-development features: \`supabase inspect db\` with 19 diagnostic commands adapted from Heroku's pg-extras, \`db dump\` backups built on pg\_dump, migration squashing and diffing via migra, pgTAP testing with \`supabase test\`, plpgsql\_check linting, seeding, and TypeScript type generation that now detects foreign-key relationships.
- [database.build v2: Bring-your-own-LLM](https://swe.quest/articles/database-build-v2-bring-your-own-llm-b2a3b83eee7ef5a0.md): Supabase · 2024-12-06 · Medium · 11 min read · PostgreSQL, LLMs, Browsers, WebAssembly
  database.build, Supabase's in-browser Postgres sandbox built on PGlite, now lets users bring any OpenAI-compatible LLM, with no login and no rate limits.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
