Visitor JS - Server Side
A trimmed down version of the VisitorAPI
JS library, that is meant to run on the server, either in a NodeJS or Rhino environment.
Provided Interfaces (Subject to naming changes!)
- generatePayload(consumerID: string, amcvCookie: string) : VisitorPayload
- getState() : State { SIDI, consumerID, customerIDs }
- AuthState : Enum
For developers
To run sample server locally
npm install
npm run dev
- open browser and go to
localhost:3000
Build Instructions
npm install
npm run build:dev
for an unminified & transpiled dev build
The built files can be found in the lib
directory.
To lint
npm run lint
To test
npm run test