Installation(WIP)

Backend Setup

Source Code

The source code to install this example can be found at

Frontend Setup

Prerequisite:

For Issuance portal two repos need to be setup

  1. Sunbird-rc-issuance-ui - which contains the main project

  2. Demo-certificate-issuance - which contains reference ui config files

To set up Issuance on your local machine these steps should followed :

  1. Navigate to these repositories and create a fork

  1. Use these commands to clone the repositories

git clone https://github.com/Sunbird-RC/sunbird-rc-issuance-ui 
  1. Clone demo-certificate-issuance repository and navigate to ui-config folder

git clone https://github.com/Sunbird-RC/demo-certificate-issuance
cd demo-certificate-issuance/ui-config
  • In this folder you will see a list of JSON files. We need to create a symbolic link of these files in the assets folder of sunbird-rc-issuance-ui repository.

  • For this: copy the path of ui-config folder and navigate to assets/config folder of sunbird-rc-issuance-ui

  • Create a symbolic link

cd sunbird-rc-issuance-ui/src/assets/config/
ln -s <path_of_ui_config_from_edu_core_registries>

For example: ln -s /home/user/Issuance/demo-certificate-issuance/ui-config

demo-certificate-issuance

  • Navigate to the src folder of sunbird-rc-issuance-ui

  • Install dependencies and run the application using these commands

cd sunbird-rc-issuance-ui/src/
Nvm use v16.13.1
yarn
npm start

Proxy configuration (How to fix CORS issues)

To avoid CORS issues you can use proxy configuration.

Step 1 Firstly check a proxy.conf.json file in the root folder.

Step 2 Now we have to create the proxy configuration for API endpoints. So add your proxy configuration in your proxy.conf.json file as given in the below format-

"/registry/api/docs": {
"target": "https://domainname/",
"secure": false,
"changeOrigin": true,
"logLevel": "debug"
}

Definition of parameters is given below-

"/echo” is your API Path. "target" is your domain name where your API’s are hosted. "secure" is a boolean type parameter, if your domain has SSL then you should use true else you should use false as value. "changeOrigin" should be true if your backend is not hosted on localhost server. “logLevel" is used to check whether a proxy is working or not. Proxy log levels are info (the default), debug, warn, error, and silent.

Step 3: Now finally we have to replace the domain name with http://localhost:4200/ from the config.json file. And Run npm start or ng serve --proxy-config proxy.conf.json.

Last updated