Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Latest commit

 

History

History
66 lines (52 loc) · 2.78 KB

README.md

File metadata and controls

66 lines (52 loc) · 2.78 KB

IoT Dashboard Application Development Guide

Prerequisites

On most Unix systems including macOS, you can install the prerequisites with a single command:

./install-prepreqs-unix.sh

Alternatively, you can install the prerequisites by following the instruction below:

  1. Install Volta using the environment specific commands listed below
    • Unix based environments
      curl https://get.volta.sh | bash
      After installing Volta, if applicable, you may need to refresh your bash profile using source ~/.bashrc to use Volta commands
    • Windows environments
      • Download and run Windows installer here
  2. Install Node.js@18 with Volta
    volta install node@18
  3. Install Yarn with Volta
    volta install yarn

Getting Started with local development

  1. Install Java Runtime Environment (JRE) version 11.x or newer
  2. Install nest a global dependency for using the Nest CLI:
    yarn add global nest
  3. Install application dependencies:
    yarn install
  4. Update the variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN under file apps/core/.env with your development AWS credentials.
  5. Start development server:
    yarn dev
  6. Application is available at URL: http://localhost:3000
  7. Log in with local Cognito credentials found at apps/core/.cognito/db/us-west-2_h23TJjQR9.json

Running the tests locally

Run local test command yarn test to test the application. The command is "batteries included" - it has everything needed to run and test the application locally.

Updating generated types locally

Run yarn gen:types in root while yarn dev is running.

Environments

Service Dependencies

The table below lists the service dependencies for different environments.

Category\Environments Local Development Local Test
Authentication cognito-local cognito-local
App API Database dynamodb-local dynamodb-local
App API Authorization cognito-local JWT generated from secret