This project is currently in development.
onborder is the official platform to expose how we do merchant onboarding @ Forter.
Clone from the current repo and then run the following command inside the root folder:
npm inpm are included as follows:
buildruns build command to pack onborderstartruns client usingrollupin the root directorytestruns the unit and e2e test suiteslintruns ESLint with --fix flag to fix problematic patterns in code. Ignore warnings.formatruns prettier with --fix flag to auto format code.coverageruns nyc to produce a test coverage reportcheck-outdatedrunsdavidwhich check if package npm dependencies are out of datecheck-vulnerabilities"runsnspwhich check if package npm dependencies have security issues
👨🏭 Installing
Clone from the current repo and then run the following command inside the root folder:
npm i🤵 Directory Layout
├─ images/
├─ patches/
├─ server/
├─ client/
│ ├─ components/
│ │ └─ ···
│ ├─ helpers/
│ │ ├─ page-element.js
│ │ └─ ···
│ ├─ pages/
│ │ ├─ page-home.js
│ │ └─ ···
│ ├─ router/
│ │ └─ routes.js
│ └─ config.js
├─ app.js
├─ app.css
├─ index.html
├─ manifest.webmanifest
├─ package.json
├─ robots.txt
├─ rollup.config.js
└─ tsconfig.json
This command serves the app at http://localhost:8000:
npm startESLint comes already installed, extending eslint-recommanded. Don't forget to install the appropriate plugin for your editor.
npm run fix-lintTesting is done using mocha and chai.
chai-as-promised is included to test promise-based code.
Mocks, stubs, etc. can be done using sinon.
nock is used to test HTTP requests.
Nock also disables your app from performing any HTTP requests during tests (see test/setup.js).
There are examples for each library in test/foo.spec.js.
npm testThe service knows to auto-deploy itself using firebase automatically. If you still need to manually deploy, run the following commands:
- Globally install firebase tools:
npm install -g firebase-tools- Run in root folder:
npm run build- Run in root folder:
firebase deployAlternatively to 3, you could also make a preview, which is parralel to the production deploy and will be auto-deleted.: Note this is a beta feature and will later on be automatically created in PRs.
firebase hosting:channel:deploy YOUR_PREVIEW_NAME_HEREIstanbul is used to produce a test coverage report. Look inside the coverage folder after running npm run coverage to see the results.
npm run coverageThe app will be deployed to Github pages once merged to main branch
