https://github.com/drupal-spider/website-comparison
A simple Node.js tool to compare web pages between two sites.
https://github.com/drupal-spider/website-comparison
Last synced: over 1 year ago
JSON representation
A simple Node.js tool to compare web pages between two sites.
- Host: GitHub
- URL: https://github.com/drupal-spider/website-comparison
- Owner: drupal-spider
- License: mit
- Created: 2022-03-31T01:36:46.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-05T01:50:30.000Z (about 3 years ago)
- Last Synced: 2025-01-04T22:19:38.474Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# website-comparison
A simple tool to compare web pages between two sites. A common use case is to compare between production and stage site before deployment.
## Install
```bash
# install required package
npm i
```
## Usage
Create a `.env` file in the root of this project:
For example
```dosini
WEBSITES = {"production": "https://www.google.com", "host": "www.google.com","stage": "https://www.google.com.au"}
BASE_PATH = /,/search?keys=business,/contact-us
MAX_SHOT = 30
VIEW_PORT = { "width": "1440", "height": "600" }
HEADLESS = true
MEM_SIZE = 1024
```
The `.env` file contains the following arguments:
* WEBSITES: The website addresses to check.
* BASE_PATH: The base pathes of those site to check.
* MAX_SHOT: The maximum number of screenshots will take or pages to check.
* VIEW_PORT: The view port dimension.
* HEADLESS: Whether to run browser in headless mode.
* MEM_SIZE: The (approximate) maximum memory that jpeg-js should allocate while attempting to decode.
## Run
`npm run start`