This repository contains the source code for a Real-time CPU Monitoring REST API built with NestJS. The API provides seamless access to live CPU data, enabling users to monitor system performance in real-time. Additionally, the infrastructure setup for this project is simplified using Terraform.
- Real-time CPU data retrieval
- NestJS backend for robust performance
- Simplified infrastructure deployment with Terraform
- Easy integration into existing systems
- Comprehensive monitoring capabilities for enhanced efficiency
Follow these steps to set up and deploy the API:
Node.js and npm installed on your machine. Terraform CLI installed locally.
$ git clone https://github.com/sumanmanna134/cpu-realtime.git
cd cpu-realtime
yarn
- Modify the terraform/main.tf file to specify your infrastructure details such as the AWS region, instance type, etc.
- Create a
.env
file in the root directory and configure environment variables required for the NestJS application. You can use .env.example as a template.
Deploy Infrastructure with Terraform:
cd terraform
terraform init
terraform apply
Access the API at http://localhost:3000 by default.
# development
$ yarn run start
# watch mode
$ yarn run start:dev
# production mode
$ yarn run start:prod
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Suman Manna
- Linkedin - @sumanmanna
Nest is MIT licensed.