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 i
npm
are included as follows:
build
runs build command to pack onborderstart
runs client usingrollup
in the root directorytest
runs the unit and e2e test suiteslint
runs ESLint with --fix flag to fix problematic patterns in code. Ignore warnings.format
runs prettier with --fix flag to auto format code.coverage
runs nyc to produce a test coverage reportcheck-outdated
runsdavid
which check if package npm dependencies are out of datecheck-vulnerabilities"
runsnsp
which 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 start
ESLint comes already installed, extending eslint-recommanded. Don't forget to install the appropriate plugin for your editor.
npm run fix-lint
Testing 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 test
The 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 deploy
Alternatively 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_HERE
Istanbul is used to produce a test coverage report. Look inside the coverage
folder after running npm run coverage
to see the results.
npm run coverage
The app will be deployed to Github pages once merged to main
branch