Guide
Share a folder of files
Serve a folder of files, such as a build output, at a public address without running a web server.
- Applies to
- Connector 0.2.0
- Time
- About 3 minutes
- What it changes
- Makes the files in one folder readable at a public address while the connector runs.
- Last reviewed
- , by Product documentation
Before you begin
What to know before you start
- Anyone with the address can read the files in the folder, unless the tunnel is protected.
- The folder is served read-only.
Steps
Step 1. Run the share command with the folder.
Terminal npx @instawormhole/connector share ./dist --relay wss://relay.instawormhole.site --stored-deviceAdd --list to show a list of files for folders that have no index.html.
You should see: The connector prints the tunnel's public address.
Step 2. Open the address.
You should see: You see the folder's index.html, or the file list if you used --list.
To check: Request a file whose name starts with a dot, such as /.env. The connector refuses it.
You are done when
- Opening the public address shows your folder's index page, or the file list if you chose it.
Undo or clean up
- Stop the connector with Ctrl+C.
Good to know
- Only GET and HEAD requests are answered.
- Files and folders whose names start with a dot, such as .env or .git, are never served.
- A link that points outside the folder is refused.
Related
This page is part of Connect a local app. Still stuck? Contact support.