https://github.com/ehsangazar/bundle-size-tracker
Bundle Size Tracker
https://github.com/ehsangazar/bundle-size-tracker
Last synced: 7 months ago
JSON representation
Bundle Size Tracker
- Host: GitHub
- URL: https://github.com/ehsangazar/bundle-size-tracker
- Owner: ehsangazar
- Created: 2024-09-13T08:20:55.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-13T15:02:11.000Z (about 1 year ago)
- Last Synced: 2025-01-23T11:45:41.457Z (8 months ago)
- Language: JavaScript
- Size: 111 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bundle Size Tracker
## Overview
The Bundle Size Tracker is an Express-based application designed to download JavaScript bundles from specified URLs, measure their sizes, and store this information in MongoDB. The application provides endpoints to trigger the bundling process and to retrieve historical bundle size data.
## Features
- **Fetch and Download Scripts:** Automatically fetch and download script files listed in an import map.
- **Measure and Store Sizes:** Measure the sizes of downloaded scripts and store this data in MongoDB.
- **Cleanup:** Periodically clean up old entries from the MongoDB collection based on a specified retention period.
- **Serve Static Files:** Serve a React application’s static files.
- **API Endpoints:**
- `/bundle` - Trigger the bundling process and save bundle sizes.
- `/analyser` - Retrieve historical bundle size data.## Prerequisites
- [Node.js](https://nodejs.org/) (v14.x or later)
- [MongoDB](https://www.mongodb.com/) (or a MongoDB Atlas account)
- [npm](https://www.npmjs.com/) (Node Package Manager)