Comparing version 1.0.3 to 1.1.0
{ | ||
"name": "tunnel.now", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"description": "Forward Zeit.now aliases to your localhost server.", | ||
@@ -10,3 +10,4 @@ "scripts": { | ||
"bin": { | ||
"tunnel.now": "./src/tunnel.js" | ||
"tunnel.now": "./src/tunnel.js", | ||
"tunnel.deploy": "./src/deploy.js" | ||
}, | ||
@@ -33,2 +34,3 @@ "repository": { | ||
"cereal-box": "^1.0.0", | ||
"execa": "^0.7.0", | ||
"node-fetch": "^1.7.1", | ||
@@ -35,0 +37,0 @@ "raw-body": "^2.2.0", |
@@ -1,1 +0,71 @@ | ||
# tunnel.now | ||
# tunnel.now | ||
Zeit's [now](https://zeit.co/now) platform is fantastic for rapid iteration on Node.js projects. However, sometimes - when debugging a webhook, for example - you might want to run the project on your development machine. | ||
You _could_ make changes, deploy, and update aliases as you go. However, this project provides an alternative: it tunnels HTTP requests that are sent to a Zeit domain to your local dev machine. | ||
## Quick start | ||
**Step 1: Install** | ||
``` | ||
> npm install -g tunnel.now | ||
/Users/dbustad/.nodenv/versions/8.0.0/bin/tunnel.now -> /Users/dbustad/.nodenv/versions/8.0.0/lib/node_modules/tunnel.now/src/tunnel.js | ||
added 79 packages in 4.609s | ||
``` | ||
**Step 2: Update npm links (optional)** | ||
This step is only necessary for users of [nodenv](https://github.com/nodenv/nodenv) | ||
``` | ||
> nodenv rehash | ||
``` | ||
**Step 3: Deploy your tunnel endpoint** | ||
``` | ||
> tunnel.deploy | ||
``` | ||
You can also alias directly at this step, like so: | ||
``` | ||
> tunnel.deploy my-alias.now.sh | ||
``` | ||
Note that this deployment can be re-used however many times you'd like. | ||
**Step 3: Start your application server** | ||
In your project directly, do what you need to do to start your server, and note the port that is opened: | ||
``` | ||
> npm run start | ||
Listening on port 8080... | ||
``` | ||
**Step 4: In a separate terminal, start your tunnel** | ||
`tunnel.now` takes two arguments: | ||
1. The `now` hostname. This will be either the hostname that `now` provided to you, or the alias that you specified during step 3. | ||
2. The port of your application, running locally. | ||
``` | ||
> tunnel.now my-alias.now.sh 8080 | ||
Connected to wss://my-alias.now.sh:443. | ||
Tunneling requests to http://localhost:8080... | ||
``` | ||
**Step 5: Open your browser!** | ||
Any HTTP requests made to the `now` hostname or alias will be tunneled to your local machine. | ||
## FAQ | ||
**Does this work with other services?** Yes. The only hard requirement is that the host provides HTTP and WebSocket support. However, you will need to deploy the `tunnel.now` repo yourself. | ||
## License | ||
This project is covered under the MIT License. Please see the [LICENSE](./LICENSE) file for more information. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9797
8
170
72
6
+ Addedexeca@^0.7.0