-
Install the docker in your machine.
-
Download Permit.io PDP container from Docker Hub.
docker pull permitio/pdp-v2:latest
-
Run the container
docker run -it \ -p 7766:7000 \ --env PDP_API_KEY=permit_key_CMsXae8FSaocUJipFWAGrV5VazIjfV4VhALRHSd08TBWi03sPK7gMk17ehij5NKADbMJUVku6N4kGPHkZBSTYs \ --env PDP_DEBUG=True \ permitio/pdp-v2:latest
-
Navigate to
backend/
foldercd backend
-
Install the required packages.
npm install
-
Create
.env
file and add following contentJWT_SECRET=123d31a56e33c2a251778b8622fb35d4a21fedb5833c75ca1762c3fc33d86acb MONGO_URL=mongodb://localhost:27017/pathshala PDP_URL=http://localhost:7766 PDP_TOKEN=permit_key_CMsXae8FSaocUJipFWAGrV5VazIjfV4VhALRHSd08TBWi03sPK7gMk17ehij5NKADbMJUVku6N4kGPHkZBSTYs
-
Populate the user
node populateUsers.js
-
Run the backend server
node server.js
Note: You can use
**nodemon**
to run the server
-
Navigate to
frontend/
foldercd frontend
-
Install the required packages.
npm install
-
Create
.env
file and add following contentVITE_BACKEND_URL=http://localhost:3001
-
Run the frontend server
npm run dev
-
You can view the live website on
http://localhost:3000/login