An open API service indexing awesome lists of open source software.

https://github.com/azkarmoulana/serverless-analytics-api

:zap: :zap: Serverless Analytics API for real time dashboard
https://github.com/azkarmoulana/serverless-analytics-api

aws dynamodb lambda node serverless typescript

Last synced: 8 months ago
JSON representation

:zap: :zap: Serverless Analytics API for real time dashboard

Awesome Lists containing this project

README

          

:zap::zap: Serverless Analytics API




architecture diagram

API to capture time series data from client application to genarate relevant metrics for real time dashboard
***

### How to run the app locally
1. Clone the repository
2. Navigate to the project folder
3. Run `npm install` to install all the required dependencies
4. Run `sls dynamodb install` to install DynamoDB local plugin(You need to have installed JRE(Java Runtime Environment) in your local machine)
5. Run `npm run start:dev` to start the serverless offline application locally

### API endpoints
**Request**
- Path: `/{STAGE}/metrics`
- Method: `POST`
- Required parameters:
- Need to add the required header values in request header

**Response**
- API returns the `201` on success

### Running unit tests
Unit tests are written using [Jest](https://jestjs.io/)
1. Run `npm run test` to run the unit tests(Make sure to run the serverless offline application in background)