From 40ec86d5fa86cd274aa19e2e7dc295b5f3b70d40 Mon Sep 17 00:00:00 2001 From: Paul Copplestone Date: Sun, 25 Jul 2021 16:28:01 +0800 Subject: [PATCH] Adds instructions for full example --- docker/README.md | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/docker/README.md b/docker/README.md index 7879034c363..0af087f422e 100644 --- a/docker/README.md +++ b/docker/README.md @@ -13,6 +13,18 @@ For better customization and security, please read the [self-hosting guide](http ## Usage +### Accessing the services directly + +- Kong: http://localhost:8000 + - GoTrue: http://localhost:8000/auth/v1/?apikey= + - PostgREST: http://localhost:8000/rest/v1/?apikey= + - Realtime: http://localhost:8000/realtime/v1/?apikey= + - Storage: http://localhost:8000/storage/v1/?apikey= +- Postgres: http://localhost:5432 + + +#### With Javascript + ```js import { createClient } from '@supabase/supabase-js' @@ -22,11 +34,15 @@ const SUPABASE_KEY = '' const supabase = createClient(SUPABASE_URL, SUPABASE_KEY) ``` -Accessing the services directly: +#### Full example -- Kong: http://localhost:8000 - - GoTrue: http://localhost:8000/auth/v1/?apikey= - - PostgREST: http://localhost:8000/rest/v1/?apikey= - - Realtime: http://localhost:8000/realtime/v1/?apikey= - - Storage: http://localhost:8000/storage/v1/?apikey= -- Postgres: http://localhost:5432 \ No newline at end of file +Once you have started all the services, you can use any of the examples in the `/examples` folder. For example: + +- Add some SMTP credentials in `env` +- Run `docker-compose up` +- Move to the Auth+Storage example: `cd ../examples/nextjs-ts-user-management` +- update `.env.local` + - `NEXT_PUBLIC_SUPABASE_URL=http://localhost:8000` + - `NEXT_PUBLIC_SUPABASE_ANON_KEY=` +- `npm install` +- `npm run dev` \ No newline at end of file