# Using Supabase in Replit

[Supabase](https://yomu.fyi/company/supabase) · Ant Wilson · Mar 11, 2021

**Type:** Tutorial

## Summary

Replit provides a collaborative, browser-based coding environment, but applications requiring structured relational queries or larger datasets need external database infrastructure. Developers can integrate a Node.js repl directly with a hosted Supabase relational database without provisioning or managing server instances. The setup process involves importing the @supabase/supabase-js client library and authenticating using the project URL alongside the anonymous API key obtained from the Supabase dashboard settings. Once initialized, developers can populate sample datasets like Countries and execute read queries using standard promise handlers or async/await syntax. The client library also supports diverse query filtering methods such as .or(), .is(), .in(), and .neq() to manipulate relational datasets directly in JavaScript.

## Context

Replit users who need to access larger datasets or advanced query tools require a relational database instead of simple key-value storage, without needing to manage servers or hosting.

## Approach / What changed

Connect a Node.js repl to Supabase by importing @supabase/supabase-js, initializing the client with the project URL and anon key from the API settings, loading sample SQL data, and running queries using promise chaining or async/await syntax.

## Takeaways

- Supabase provides a hosted relational database accessible directly from JavaScript using the @supabase/supabase-js library without requiring server configuration.
- Connecting to Supabase requires configuring createClient with the project URL and the anon key found in the project API settings.
- The supabase-js client supports query chaining and async/await syntax along with filter methods such as .or(), .is(), .in(), and .neq().

**Tags:** [Developer Experience](https://yomu.fyi/topic/developer-experience)

[Read original post](https://supabase.com/blog/using-supabase-replit)
