moru-web-sdk
v1.0.3
Published
Moru Payment Gateway
Downloads
59
Readme
Getting Started with Moru Payment Gateway
Available Scripts
In the project directory, you can run:
To start SPA in local mode
npm start
This will starts the SPA in local mode,
There are 4 modes in which SPA can run : local | staging | pre_production | production
these different modes have different envs
To run the SPA in different mode:
cd client && npm start:production
To create a build of SPA:
cd client && npm run build:production
This will create a build using production API
cd client && npm run build:staging
This will create a build using Staging server API
Runs the React SPA in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Run and Build SDK
There are three modes in which SDK can run : local | pre_production | production
The url of staging and proudction is selected from live* | test* starting value of access_key
npm run sdk -- type=local
This will run the sdk using .env.local configuration
npm run build:sdk -- type=production
This will creates a sdk build using .env.production configuration
For Pre Production
npm run build:sdk -- type=pre_production
This will creates a sdk build using .env.pre_production configuration
Runs the MoruCheckout Library in the development mode.
The development build of the library is available inside sdk/build folder.
The library will build every time you made any changes to the raw library file <sdk/index.js>.
Publishing Package to NPM
Build the package in production mode
npm run build:sdk -- type=production
This will creates a sdk build using .env.production configuration
Update the package version if needed.
go to package.json and update package version
Publish to NPM