# AWS CDK Change Analyzer (C2A) - Web App `@aws-c2a/web-app` is a package that generates a web app to help you visualize and interact with the change report generated by `@aws-c2a/engine`; ## Usage We recommend using the [`aws-c2a`](https://npmjs.com/package/aws-c2a) CLI to run the web app. However, if you wish to interact directly with the package itself check out the [integration](#integration) section below. ## Integration To use the web app package in a **production** environment: 1. Install the `@aws-c2a/web-app` package ``` yarn add @aws-c2a/web-app ``` 2. Import package and obtain the path to the template file ```ts const templatePath = require(resolve('@aws-c2a/web-app/fixtures/template.index.html')); const template = await fs.promises.readFile(templatePath, 'utf-8'); ``` 3. Replace the placeholder values in the template file with stringified change report ```ts const webapp = template.replace('"!!!CDK_CHANGE_ANALYSIS_REPORT"', report); ``` To use the web app package in a **developer** environment: 1. First install and build all packages. ``` git clone https://github.com/cdklabs/awscdk-change-analyzer.git cd awscdk-change-analyzer yarn install yarn build cd packages/@aws-c2a/web-app ``` 2. Then create the necessary data file (change report) for testing. ``` touch data.json ``` 3. Now you can start developing with `@aws-c2a/web-app` running locally. ``` yarn dev ```