Skip to content
Alessandro De Luca edited this page Dec 9, 2024 · 1 revision

You can use SPREAD with the provided server.js by running the following command:

npm start

This server acts as a proxy, allowing you to download resources using the withProxy parameter in the query string. For example:

http://localhost:8080/?tree=https://example.com/tree.nwk&withProxy

You can set custom variables to control the proxy:

  • SERVER_JSON_LIMIT=10mb
  • SERVER_URLENCODED_LIMIT=5mb
  • SERVER_MAX_DOWNLOAD_SIZE_KB=1024
  • SERVER_ALLOWED_DOMAINS_FOR_DOWNLOAD=domain1.com,domain2.com

Example:

Windows:

set SERVER_JSON_LIMIT=2mb && set SERVER_URLENCODED_LIMIT=2mb && set SERVER_MAX_DOWNLOAD_SIZE_KB=1024 && node server.js

Linux:

SERVER_JSON_LIMIT=2mb SERVER_URLENCODED_LIMIT=2mb SERVER_MAX_DOWNLOAD_SIZE_KB=1024 node server.js

You can also specify your proxy:

http://localhost:8080/?tree=https://example.com/tree.nwk&withProxy=https://myproxy.com

SPREAD will use the following format for the proxy URL: https://myproxy.com/download?url={url}

Clone this wiki locally