An ExpressJS App that generates and displays a chart of the bundle sizes history of compiled AMP files. It is deployed at https://amp-bundle-size-chart.appspot.com/
Unlike the other apps in this repository, this one was cobbled together quickly. If you would like to improve the code or documentation, please send us a pull request!
Required tools:
Steps:
- Clone this repository and cd into the
bundle-size-chart
directory - Run
npm install
- Create a user-based GitHub token with
public_repo
permissions. - Create a file called
.env
with one line:(whereACCESS_TOKEN=[[GITHUB_ACCESS_TOKEN]]
[[GITHUB_ACCESS_TOKEN]]
is the token generated in the previous step, without the square brackets.) - Create a Google AppEngine flexible NodeJS instance with a Google Cloud
Storage bucket
- When asked, set a uniform (no per-object ACL) access control on the storage bucket
- Add a
Storage Object Viewer
permission toallUsers
on the storage bucket
- Set the CORS permissions on the bucket to allow connections from your GAE
instance. Edit the
cors-json-file.json
file to add your GAE instance's.appspot.com
domain and run:gsutil cors set cors-json-file.json gs://[[CLOUD_STORAGE_BUCKET_NAME]]
- Run
npm run deploy
andnpm run deploy-cron
to deploy the app and cron job