Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 1.05 KB

README.md

File metadata and controls

63 lines (41 loc) · 1.05 KB

S3PWeb - Security Pass example

Description

This repository is an example project to show how to access security pass events (using the NestJs framework).

The app.service.ts file contains the main logic of this application (2 CRONs, one to get all current access requests and another one to get the associated events).

The accesses.service.ts file contains a function to get all current accesses.

The events.service.ts file contains a function to get the events and a function to process the events.

Javascript

Installation

$ npm install

Then update the file in ./javascript/security-pass-exemple.js with the API url and your token.

Running the app

npm run start:js

NestJS

Installation

Use node 20 and create a .env file containing the following:

API_URL=
TOKEN=
$ npm install

Running the app

# development
$ npm run start

# development watch mode
$ npm run start:dev

Test

# unit tests
$ npm run test

# test coverage
$ npm run test:cov