like-gold
like-gold3d ago

How to start instance Permify of examples access control permify with Refine?

How to start instance Permify of examples access control permify with Refine?
2 Replies
kapa.ai
kapa.ai3d ago
Hi @tingadev. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- To start an instance of Permify for the access control example with Refine, you can follow these steps: 1. First, you need to set up Permify Service in your environment. For this example, we'll use Docker to run Permify locally. 2. Run the following Docker command to start Permify:
docker run -p 3476:3476 -p 3478:3478 ghcr.io/permify/permify serve
docker run -p 3476:3476 -p 3478:3478 ghcr.io/permify/permify serve
This command will start Permify on your local machine, exposing ports 3476 and 3478. 3. After running the command, you should see output in your terminal indicating that Permify is running. 4. To test your connection to Permify, you can send an HTTP GET request to:
localhost:3476/healthz
localhost:3476/healthz
This will check if Permify is running correctly. 5. Once Permify is running, you can initialize the Permify client in your Refine application. In your App.tsx file, you can create an instance of the Permify client like this:
const instance = "<http://localhost:3476";>
const permify = new PermifyClient(instance);
const instance = "<http://localhost:3476";>
const permify = new PermifyClient(instance);
This sets up the Permify client to communicate with your locally running Permify instance. By following these steps, you'll have a Permify instance running and connected to your Refine application for access control. Source: Build Access Control Mechanism using Permify (https://refine.dev/blog/access-control/#step-1-setup-the-permify-in-refine-application) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3d ago
<@761921731505946634> Kapa.ai is still learning and improving, please let me know how I did by reacting below.