This document details the steps to setup pre-registration on your local environment.
Instructions
Clone MOSIP’s Reference implementation repository (https://github.com/mosip/mosip-ref-impl.git).
Open the directory, “pre-registration-ui” of the desired branch.
Run npm install
Run ng serve / npm run start
Open http://localhost:4200 in the web browser you should be able to see the login screen.
Troubleshooting
Below are are some of the issues that you might face during the installation and the steps to overcome them.
You may face CORS issue while running the pre-registration in your local.
In order to resolve this issue you should follow the below steps,
Create a proxy.conf.json file inside src and add the following content,
{ "/api/*": { "target": "https://aws.digitalid.lgcc.gov.lk/", "secure": false, "logLevel": "debug" } }
Go to angular.json and travers through, “projects -> pre-registration -> architect -> serve -> options” and then add "proxyConfig": "src/proxy.conf.json" beside browsertarget.
Go to config.json and environment.ts and change the base URL to your base URL.
Now do a ng serve and you would not face the issue.
MOSIP thanks Michael Marshal from Axiata Digital Labs, Sri Lanka for contributing the contents that constitute this page.