1.0.5 • Published 2 years ago

@shahruk/local-proxy-server v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@shahruk/local-proxy-server

Local Proxy Server lets you serve a page locally with a proxy server as fallback. The page gets downloaded to a local file and then served via a local HTTP server. Includes BYPASS_AKAMAI headers by default.

Usage

npx @shahruk/local-proxy-server URL_TO_SCRAPE SAVE_PATH PROXY_URL

Example: Save https://www.example.com/ as index.html and serve all missing files from https://example.com

npx @shahruk/local-proxy-server https://www.example.com/ index.html https://example.com

Authentication

Scrape a site behind basic auth using the authentication header.

npx @shahruk/local-proxy-server https://www.example.com/ --authentication="username:password" index.html https://example.com

What can I use this for?

  • When working on JS and CSS files for a slow monolithic app, you can treat the monolith as a static site generator
  • Download any website and edit it however you want locally
    • Download a news page and edit it to make fake headlines
    • Download the example homepage and insert your own custom feature
    • Customize a template to see what it would look like with your own images
    • Etc.

Additional Files

If for example example.com's logo was saved as /logo.jpg, you could add a file locally as logo.jpg and it would be served instead of the one hosted at https://example.com/logo.jpg

License

MIT

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago