Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.64 KB

README.md

File metadata and controls

50 lines (38 loc) · 1.64 KB

OpenCRVS API for MOSIP

Warning

Work in progress! This release is not yet ready for production use.

This package ensures a secure and a robust integration between OpenCRVS and MOSIP. For instructions on how to setup the integration, please refer to the installation.md. For local development, see instructions below. For features and core versions supported, please refer to the compatibility.md.

Development

# start the web server
cd packages/server
yarn install
yarn dev

# optionally run MOSIP mock server
cd packages/mosip-mock
yarn install
yarn dev

Country configuration

# installs the npm package that is used to replace the default eventRegistrationHandler
yarn add @opencrvs/mosip

@opencrvs/opencrvs-countryconfig/src/index.ts

-import { eventRegistrationHandler } from '@countryconfig/api/event-registration/handler'
+import { mosipRegistrationHandler } from '@opencrvs/mosip'

 server.route({
   method: 'POST',
   path: '/event-registration',
-  handler: eventRegistrationHandler,
+  handler: mosipRegistrationHandler({ url: "http://localhost:2024" })),
   options: {
     tags: ['api'],
     description:
       'Opportunity for sychrounous integrations with 3rd party systems as a final step in event registration. If successful returns identifiers for that event.'
   }
 })

Usage

The gateway runs by default in port 2024, the same year the stable version of the MOSIP integration is released. The MOSIP-mock service runs in 20240.