This guide explains how to set up a local PostgreSQL database for the Aniguess project.
Make sure you have the following installed:
- PostgreSQL
- Node.js
- npm
- Git
This guide explains how to install and run Supabase locally on Windows for the Aniguess project.
Before starting, install the following:
- Node.js
- npm
- Git
- Docker Desktop
- Supabase CLI
Download and install Docker Desktop for Windows.
After installing, open Docker Desktop and make sure it is running.
To check if Docker is working, open PowerShell or Git Bash and run:
docker --version
docker psnpm install supabase --save-devTo check:
npx supabase --helpnpx supabase initThis creates a supabase/ folder:
supabase/
└── config.tomlnpx supabase startAfter that Supabase will generate credentials similar to:
API URL: http://127.0.0.1:54321
DB URL: postgresql://postgres:postgres@127.0.0.1:54322/postgres
Studio URL: http://127.0.0.1:54323
anon key: your_local_anon_key
service_role key: your_local_service_role_key # Do not expose this!For arch
sudo pacman -S postgresql
sudo -iu postgres initdb --locale=C.UTF-8 --encoding=UTF8 -D /var/lib/postgres/data
sudo systemctl start postgresql
sudo systemctl enable postgresqlCreate a local database named aniguess:
sudo -u postgres createdb aniguessRun the schema file:
sudo -u postgres psql -d aniguess -f supabase/seeders/schema.sqlTo check if it was created do:
sudo -u postgres psql -d aniguess
\dtSummary:
Commands
sudo -u postgres dropdb aniguess
sudo -u postgres createdb aniguess
sudo -u postgres psql -d aniguess -f supabase/seeders/schema.sql