Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.53 KB

File metadata and controls

61 lines (40 loc) · 1.53 KB

Vouched NodeJS Example

This example repo consists of two parts

  1. Tests to highlight usage of REST API
  2. Development Server to highlight JS Plugin

REST API

1. Install dependencies

npm ci install

2. Add your Private Key

  • If necessary, create a Private Key
  • Create .env file in project and add the following contents to file:
API_KEY=<PRIVATE_KEY>

3. Run the tests

npm run test

4. View each endpoint and learn more

JSPlugin

1. Install dependencies

npm ci install

2. Add your Public Key

  • If necessary, create a Public Key
  • Open static/configureVouched.js
  • Replace <PUBLIC_KEY> with your Public Key

3. Start Development Server

PORT=3000 node server.js

In a browser, head to http://localhost:3000/static/index.html to see the Vouched JS Plugin in action.

4. Modify configuration for the Plugin

Feel free to modify any configurations in static/configureVouched.js. Here is the full list of configuration options