Setting Up Pre-registration in your local

This document details the steps to setup pre-registration on your local environment.

Instructions

  1. Clone MOSIP’s Reference implementation repository (https://github.com/mosip/mosip-ref-impl.git).

  2. Open the directory, “pre-registration-ui” of the desired branch.

  3. Run npm install

  4. Run ng serve / npm run start

  5. 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,

  1. Create a proxy.conf.json file inside src and add the following content,

    { "/api/*": { "target": "<base_URL>", "secure": false, "logLevel": "debug" } }
  2. Go to angular.json and travers through, “projects -> pre-registration -> architect -> serve -> options” and then add "proxyConfig": "src/proxy.conf.json" beside browsertarget.

  3. Go to config.json and environment.ts and change the base URL to your base URL.

  4. Now do a ng serve and you would not face the issue.

If you still face the issue enable CORS plugin in the browser level and that should let you send and receive different origin requests. You could use the following plugins for Chrome and Firefox,

 

MOSIP thanks Michael Marshal from Sri Lanka (SLUDI) for contributing to this page