Skip to content

Latest commit

 

History

History
87 lines (59 loc) · 1.61 KB

INSTALLATION.md

File metadata and controls

87 lines (59 loc) · 1.61 KB

Installation

OPAL Docker

  1. Install the docker in your machine.

  2. Download Permit.io PDP container from Docker Hub.

    docker pull permitio/pdp-v2:latest
  3. Run the container

    docker run -it \
    -p 7766:7000 \
    --env PDP_API_KEY=permit_key_CMsXae8FSaocUJipFWAGrV5VazIjfV4VhALRHSd08TBWi03sPK7gMk17ehij5NKADbMJUVku6N4kGPHkZBSTYs \
    --env PDP_DEBUG=True \
    permitio/pdp-v2:latest

Backend

  1. Install nodejs and mongodb into your machine.

  2. Navigate to backend/ folder

    cd backend
  3. Install the required packages.

    npm install
  4. Create .env file and add following content

    JWT_SECRET=123d31a56e33c2a251778b8622fb35d4a21fedb5833c75ca1762c3fc33d86acb
    MONGO_URL=mongodb://localhost:27017/pathshala
    PDP_URL=http://localhost:7766
    PDP_TOKEN=permit_key_CMsXae8FSaocUJipFWAGrV5VazIjfV4VhALRHSd08TBWi03sPK7gMk17ehij5NKADbMJUVku6N4kGPHkZBSTYs
  5. Populate the user

    node populateUsers.js
  6. Run the backend server

    node server.js

    Note: You can use **nodemon** to run the server

Frontend

  1. Navigate to frontend/ folder

    cd frontend
  2. Install the required packages.

    npm install
  3. Create .env file and add following content

    VITE_BACKEND_URL=http://localhost:3001
  4. Run the frontend server

    npm run dev
  5. You can view the live website on http://localhost:3000/login