The backend, a component of Skopos, hosts a GraphQL server. It uses Apollo Server, Prisma, and AWS SDK, and serves as a gateway to the database. Backend is responsible for:
- Creating, reading, updating, and deleting data on collection of tests with assertions.
- Creating, reading, updating, and deleting data on schedules using AWS Event Bridge.
- Setting up Lambda function as a target of the Event Bridge rule invocation.
- Creating, reading, updating, and deleting data on topic and subscribers using AWS SNS (Simple Notification Service).
For development you will need Node.js environment, AWS credentials, and Lambda function set up in AWS.
- Clone the repo:
git clone https://github.com/skopos-api-monitoring/skopos-backend.git
- Navigate inside the folder:
cd skopos-backend
- Run NPM install to generate necessary type files:
npm install
- Add an
.env
file with the following variables in the root folder:
DATABASE_URL
: url pointing to the postgres databasePORT
: port on which the server listensLAMBDA_ARN
: ARN of the lambda function set up in AWSLAMBDA_NAME
: Name of the lambda functionAWS_REGION
: AWS region where AWS infrastructure is deployed
- Run the server:
npm start